Skip to content

Instantly share code, notes, and snippets.

@reid
Created August 16, 2010 20:55
Show Gist options
  • Save reid/527712 to your computer and use it in GitHub Desktop.
Save reid/527712 to your computer and use it in GitHub Desktop.
<?php
$file = <<<EOF
attribute/tests/attribute.html
async-queue/tests/async-queue.html
cache/tests/cache.html
cache/tests/cacheoffline.html
classnamemanager/tests/classnamemanager.html
collection/tests/arraylist.html
collection/tests/collection.html
console/tests/console.html
datatype/tests/number.html
datatype/tests/xml.html
dd/tests/dd.html
dom/tests/dom.html
dom/tests/selector.html
dump/tests/dump.html
event-custom/tests/customevent.html
event/tests/dom.html
event/tests/delegate.html
event/tests/event-synthetic.html
event/tests/focusblur.html
EOF;
$tests = split("\n", $file);
$target = array_pop($tests);
//$target = "event/tests/focusblur.html";
//print "$target\n";
$offset = -1;
$opt = $_SERVER["argv"][1];
if ($opt) $offset = 0 - $opt;
while (abs($offset) != count($tests)) {
$ret = 0;
$suite = array_slice($tests, $offset);
$suite[] = "$target --solo";
array_unshift($suite, "yeti");
$cmd = implode(" ", $suite);
print "$cmd\n";
passthru($cmd, $ret);
if ($ret) exit($ret);
sleep(1);
$offset--;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment