Tobias Dammers avatar Tobias Dammers committed 50cbd1a

Added phpaco option to runtest script

Comments (0)

Files changed (1)

 $hpaco_binary = '../cabal-dev/bin/hpaco';
+$phpaco_binary = 'phpaco';
 $node_binary = 'node';
 $json_data = '';
 $template = '';
 					case 'js':
 					case 'run':
 					case 'jsl':
+					case 'phpaco':
 						$mode = $arg;
 		$json_src = implode("\n", $json_src);
 		$json_data = escapeshellarg($json_data);
-		$phpaco_command = "phpaco -r -d $json_data <<EOT\n{$json_src}\nEOT";
+		$phpaco_command = "$phpaco_binary -r -d $json_data <<EOT\n{$json_src}\nEOT";
 		if ($dump_src) {
 			echo $json_src;
 		echo implode("\n", $phpaco_output);
 		echo "\n";
+	case 'phpaco':
+		$json_data = escapeshellarg($json_data);
+		$phpaco_command = "$phpaco_binary -d $json_data <$tmpfilename";
+		if ($dump_cmd)
+			echo $phpaco_command;
+		chdir(dirname(__FILE__) . "/tests");
+		exec($phpaco_command, $phpaco_output, $retval);
+		if ($retval) {
+			fprintf(STDERR, "phpaco execution failed with exit code $retval");
+			exit(-2);
+		}
+		echo implode("\n", $phpaco_output);
+		echo "\n";
+		break;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.