I worked it out. %SUITES () should point to the js files you are testing and $SUITE must point to a location of your own changeset
On Oct 21, 4:13 pm, Dominic Lovell <[email protected]> wrote: > Hey, > > I've tried to setup a local instance of TestSwarm, the install was ok, > but Im having trouble getting my cron to add jobs. I'm testing using > QUnit. > > I get the following error when my testswarm-jquery.pl tries to make a > curl call to my TestSwarm: > > Invalid argument supplied for foreach() in addjob.php on line 25 > > I've checked the code, and it fails on this line: > > foreach ( $_POST['suites'] as $suite_num => $suite_name ) { > > looking at my perl script execute, here are the parameters: > > auth=bb59931823311bfdca696401e46cb59cc5057e83&job_name=jQuery%20Commit > %20%23350&max=1&user=jquery&browsers=popularbeta&output=dump&state=addjob > > meaning 'suites' doesnt get included, and is therefore null in the > foreach() loop. > > Inside testswarm-jquery.pl here is the relevant code that populates > 'suites': > > my $SUITE = "http://dev.jquery.com/~john/changeset/{REV}"; > sub BUILD_SUITES { > %SUITES = map { /(\w+).js$/; $1 => "$SUITE/test/?$1%20module"; } glob > ("test/unit/*.js"); > > } > > ... and > > if ( exists &BUILD_SUITES ) { > &BUILD_SUITES(); > > } > > .... and > > foreach my $suite ( sort keys %SUITES ) { > $query .= "&suites[]=" . clean($suite) . > "&urls[]=" . clean($SUITES{$suite}); > > } > > I'm not familiar with Perl at all, but from what I can find on google, > all the javascript files > insidehttp://dev.jquery.com/~john/changeset/{REV}/test/unit > are being populated into %SUITES which then which addjob.php inserts > into the run table. > > So why doesn't my %SUITES variable get populated? > > I also assumed I needed to change: > my $SUITE = "http://dev.jquery.com/~john/changeset/{REV}" > to a valid revision, so in my file this line is: > my $SUITE = "http://dev.jquery.com/~john/changeset/jquery/6311/" > > Can someone tell me what I'm doing wrong here? > > Thanks, > Dom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TestSwarm" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/testswarm?hl=en -~----------~----~----~----~------~----~------~--~---
