Skip to content

Commit cf1cedd

Browse files
committed
Allow tests to be run outside of rakudo dir
Absolutify lib paths and file paths using $?FILE.IO.parent(...), since a test can know the file layout of its own repo but not the cwd the user is invoking a test from. This allows you to install perl6, clone the roast anywhere you wish, and then run the spectest with: prove -v -e 'perl6' path/to/roast/*.t fudging still needs to be done: perl fudgeall rakudo.moar **/*.t > test-list-spaces.txt perl -p -e 's/\s+/\n/g' test-list-spaces.txt > test-list.txt prove --ignore-exit -r -j4 -e 'perl6' - < test-list.txt This doesn't handle the spectest.data list since it does not exist in this repo. The important step here is simply getting out of the rakudo repo, which makes parallel build system stuff possible.
1 parent 05c0fd8 commit cf1cedd

File tree

254 files changed

+468
-460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+468
-460
lines changed

MISC/bug-coverage-stress.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6.c;
2-
use lib <t/spec/packages>;
2+
use lib $?FILE.IO.parent(2).add("packages");
33
use Test;
44
use Test::Util;
55

S01-perl-5-integration/eval_lex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6;
2-
use lib <t/spec/packages/>;
2+
use lib $?FILE.IO.parent(2).add("packages");
33
use Test;
44
use Test::Util;
55
plan 2;

S02-literals/allomorphic.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# S02-literals/allomorphic.t --- Tests for the various allmorphic types, and val() processing
22

33
use v6;
4-
use lib 't/spec/packages';
4+
use lib $?FILE.IO.parent(2).add("packages");
55
use Test;
66
use Test::Util;
77

S02-literals/heredocs.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6;
2-
use lib <t/spec/packages/>;
2+
use lib $?FILE.IO.parent(2).add("packages");
33
use Test;
44
use Test::Util;
55
plan 34;

S02-literals/pairs.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22

3-
use lib 't/spec/packages';
3+
use lib $?FILE.IO.parent(2).add("packages");
44

55
use Test;
66
use Test::Idempotence;

S02-literals/quoting.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use v6;
2-
use lib <t/spec/packages>;
3-
use lib <packages>;
2+
use lib $?FILE.IO.parent(2).add("packages");
43
use Test;
54
use Test::Util;
65
plan 191;

S02-literals/string-interpolation.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6;
2-
use lib 't/spec/packages';
2+
use lib $?FILE.IO.parent(2).add("packages");
33

44
use Test;
55
use Test::Util;

S02-magicals/78258.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6;
22

3-
use lib 't/spec/S02-magicals';
4-
use UsedEnv; # contains plan
3+
use lib $?FILE.IO.parent;
54

5+
use UsedEnv; # contains plan

S02-magicals/KERNEL.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6;
2-
use lib <t/spec/packages>;
2+
use lib $?FILE.IO.parent(2).add("packages");
33
use Test;
44
use Test::Util;
55

S02-magicals/args.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use v6;
2-
use lib 't/spec/packages';
2+
use lib $?FILE.IO.parent(2).add("packages");
33

44
use Test;
55

0 commit comments

Comments
 (0)