-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtriggerTests.php
More file actions
executable file
·26 lines (24 loc) · 890 Bytes
/
triggerTests.php
File metadata and controls
executable file
·26 lines (24 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
require( "config.php" );
//$log = '/var/www/web-animations-test-infrastructure/logfile.txt';
//$fp = fopen($log, 'a') or exit("Can't open $log!");
//fwrite($fp, "This is triggerTests.php" . PHP_EOL);
$nextRun = QueuedRun::getNextRun();
//$a = $nextRun -> commitMessage;
//fwrite($fp, "$a" . PHP_EOL);
if($nextRun){
// There's a test run to do
// Create a new test run
$run = new Run;
$a = array("commitSHA" => $nextRun -> sha1,
"commitMessage" => $nextRun -> commitMessage,
"commitOrder" => $nextRun -> id,
"testsPassed" => "Running...");
$runId = $run -> createEntry($a);
$sha1 = $nextRun -> sha1;
// Delete the QueuedRun that was just completed
$nextRun -> delete();
//fwrite($fp, "This is triggerTests.php leaving" . PHP_EOL);
exec("bash /var/www/web-animations-test-infrastructure/triggerTests.sh $sha1 $runId ");
}
?>