Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convert to p6; make it easy to retest
add overview
- Loading branch information
Showing
3 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ highlights/atom-language-perl6/ | |
.DS_store | ||
highlights/package-lock.json | ||
.pod-cache | ||
retest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env perl6 | ||
|
||
=begin overview | ||
Not everyone runs the extended test suite; this gives developers the ability | ||
to test as they go; it updates the repository, runs xtest only on those | ||
files that have changed in that update, and leaves a local 'retest' script | ||
that can be rerun against those changes until xtest is clean. | ||
=end overview | ||
|
||
# Get the old and new commit IDs | ||
|
||
sub get-rev { | ||
run(<git rev-parse HEAD>, :out).out.slurp(:close).chomp; | ||
} | ||
|
||
my $old-rev = get-rev; | ||
run(<git pull --rebase>); | ||
my $new-rev = get-rev; | ||
|
||
if $old-rev eq $new-rev { | ||
say "No chages to test."; | ||
} else { | ||
my $revs = $old-rev ~ ".." ~ $new-rev; | ||
my $files = run('git', 'diff', '--name-only', $revs, :out).out.slurp(:close).chomp.split("\n").sort.join(" "); | ||
my $outfile = "./retest"; | ||
|
||
my $of = $outfile.IO.open(:w); | ||
|
||
$of.say: "#!/usr/bin/env perl6"; | ||
$of.say: "\%*ENV<TEST_FILES>='$files';"; | ||
$of.say: "say \%*ENV<TEST_FILES>;"; | ||
$of.say: "run(<make xtest>).so"; | ||
|
||
$of.close; | ||
|
||
run('chmod', 'a+x', $outfile); | ||
|
||
run($outfile).so; | ||
say "Test same set of files again with $outfile"; | ||
} |
This file was deleted.
Oops, something went wrong.