mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-24 12:58:39 +00:00
[SV 62175] Rework secondary expansion tests
The hash function we use can yield different results on big- and little-endian systems which makes test output different. Choose names to avoid this. * tests/scripts/features/patternrules: Choose portable target names. * tests/scripts/features/se_explicit: Ditto. * tests/scripts/features/se_implicit: Ditto.
This commit is contained in:
parent
5b1e871d2d
commit
4e1be4a60c
3 changed files with 35 additions and 34 deletions
|
@ -345,12 +345,13 @@ unlink('hello.x', 'test.x', 'hello.tsk');
|
|||
|
||||
# subtest 1.
|
||||
# a.1 and a.2 are intermediate and should be removed.
|
||||
|
||||
run_make_test(q!
|
||||
a.4:
|
||||
%.4: %.1 %.2 ; cat $^ >$@
|
||||
%.1 %.2: ; touch $*.1 $*.2
|
||||
%.4: %.1 %.15 ; cat $^ >$@
|
||||
%.1 %.15: ; touch $*.1 $*.15
|
||||
!,
|
||||
'', "touch a.1 a.2\ncat a.1 a.2 >a.4\nrm a.1 a.2");
|
||||
'', "touch a.1 a.15\ncat a.1 a.15 >a.4\nrm a.15 a.1");
|
||||
|
||||
unlink('a.4');
|
||||
|
||||
|
@ -359,11 +360,11 @@ unlink('a.4');
|
|||
# a.3 is explicit and should not be removed.
|
||||
run_make_test(q!
|
||||
a.4:
|
||||
%.4: %.1 %.2 a.3 ; cat $^ >$@
|
||||
%.1 %.2: ; touch $*.1 $*.2
|
||||
%.4: %.1 %.15 a.3 ; cat $^ >$@
|
||||
%.1 %.15: ; touch $*.1 $*.15
|
||||
%.3: ; touch $@
|
||||
!,
|
||||
'', "touch a.3\ntouch a.1 a.2\ncat a.1 a.2 a.3 >a.4\nrm a.1 a.2");
|
||||
'', "touch a.3\ntouch a.1 a.15\ncat a.1 a.15 a.3 >a.4\nrm a.15 a.1");
|
||||
|
||||
unlink('a.3', 'a.4');
|
||||
|
||||
|
@ -372,10 +373,10 @@ unlink('a.3', 'a.4');
|
|||
# a.3 is explicit and should not be removed.
|
||||
run_make_test(q!
|
||||
a.4:
|
||||
%.4: %.1 %.2 a.3 ; cat $^ >$@
|
||||
%.1 %.2 %.3: ; touch $*.1 $*.2 $*.3
|
||||
%.4: %.1 %.15 a.3 ; cat $^ >$@
|
||||
%.1 %.15 %.3: ; touch $*.1 $*.15 $*.3
|
||||
!,
|
||||
'', "touch a.1 a.2 a.3\ncat a.1 a.2 a.3 >a.4\nrm a.1 a.2");
|
||||
'', "touch a.1 a.15 a.3\ncat a.1 a.15 a.3 >a.4\nrm a.15 a.1");
|
||||
|
||||
unlink('a.3', 'a.4');
|
||||
|
||||
|
@ -384,10 +385,10 @@ unlink('a.3', 'a.4');
|
|||
# a.3 is explicit and should not be removed.
|
||||
run_make_test(q!
|
||||
a.4:
|
||||
%.4: %.1 %.2 a.3 ; cat $^ >$@
|
||||
%.3 %.1 %.2: ; touch $*.1 $*.2 $*.3
|
||||
%.4: %.1 %.15 a.3 ; cat $^ >$@
|
||||
%.3 %.1 %.15: ; touch $*.1 $*.15 $*.3
|
||||
!,
|
||||
'', "touch a.1 a.2 a.3\ncat a.1 a.2 a.3 >a.4\nrm a.1 a.2");
|
||||
'', "touch a.1 a.15 a.3\ncat a.1 a.15 a.3 >a.4\nrm a.15 a.1");
|
||||
|
||||
unlink('a.3', 'a.4');
|
||||
|
||||
|
@ -396,10 +397,10 @@ unlink('a.3', 'a.4');
|
|||
# a.3 is explicit and should not be removed.
|
||||
run_make_test(q!
|
||||
a.4:
|
||||
%.4: a.3 %.1 %.2 ; cat $^ >$@
|
||||
%.1 %.2 %.3: ; touch $*.1 $*.2 $*.3
|
||||
%.4: a.3 %.1 %.15 ; cat $^ >$@
|
||||
%.1 %.15 %.3: ; touch $*.1 $*.15 $*.3
|
||||
!,
|
||||
'', "touch a.1 a.2 a.3\ncat a.3 a.1 a.2 >a.4\nrm a.1 a.2");
|
||||
'', "touch a.1 a.15 a.3\ncat a.3 a.1 a.15 >a.4\nrm a.15 a.1");
|
||||
|
||||
unlink('a.3', 'a.4');
|
||||
|
||||
|
|
|
@ -224,13 +224,13 @@ all: 2.x
|
|||
# subtest 2. Explicit rules. 2nd rule.
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: 2.x 1.x
|
||||
2.x: 5.z 6.z 5.z | 7.z 7.z 8.z
|
||||
all: 15.x 1.x
|
||||
15.x: 5.z 6.z 5.z | 7.z 7.z 8.z
|
||||
1.x: 1.z 2.z 2.z | 3.z 4.z
|
||||
2.x 1.x: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
15.x 1.x: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
%.z: ;
|
||||
!, '',
|
||||
"@=2.x,<=5.z,^=5.z 6.z,+=5.z 6.z 5.z,|=7.z 8.z,?=,*=,%=
|
||||
"@=15.x,<=5.z,^=5.z 6.z,+=5.z 6.z 5.z,|=7.z 8.z,?=,*=,%=
|
||||
@=1.x,<=1.z,^=1.z 2.z,+=1.z 2.z 2.z,|=3.z 4.z,?=,*=,%=
|
||||
#MAKE#: Nothing to be done for 'all'.\n");
|
||||
|
||||
|
@ -238,11 +238,11 @@ all: 2.x 1.x
|
|||
# subtest 3. Grouped targets in explicit rules. 1st rule.
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: 2.x
|
||||
2.x 1.x&: 5.z 6.z 5.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
all: 15.x
|
||||
15.x 1.x&: 5.z 6.z 5.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
%.z: ;
|
||||
!, '',
|
||||
"@=2.x,<=,^=,+=,|=,?=,*=,%=
|
||||
"@=15.x,<=,^=,+=,|=,?=,*=,%=
|
||||
@=1.x,<=,^=,+=,|=,?=,*=,%=
|
||||
#MAKE#: Nothing to be done for 'all'.\n");
|
||||
|
||||
|
@ -250,13 +250,13 @@ all: 2.x
|
|||
# subtest 4. Grouped targets in explicit rules. 2nd rule.
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: 2.x 1.x
|
||||
2.x: 5.z 6.z 5.z | 7.z 7.z 8.z
|
||||
all: 15.x 1.x
|
||||
15.x: 5.z 6.z 5.z | 7.z 7.z 8.z
|
||||
1.x: 1.z 2.z 2.z | 3.z 4.z
|
||||
2.x 1.x&: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
15.x 1.x&: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
%.z: ;
|
||||
!, '',
|
||||
"@=2.x,<=5.z,^=5.z 6.z,+=5.z 6.z 5.z,|=7.z 8.z,?=,*=,%=
|
||||
"@=15.x,<=5.z,^=5.z 6.z,+=5.z 6.z 5.z,|=7.z 8.z,?=,*=,%=
|
||||
@=1.x,<=1.z,^=1.z 2.z,+=1.z 2.z 2.z,|=3.z 4.z,?=,*=,%=
|
||||
#MAKE#: Nothing to be done for 'all'.\n");
|
||||
|
||||
|
@ -280,13 +280,13 @@ all: 2.x
|
|||
# subtest 6. 2nd double colon rule.
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: 2.x 1.x
|
||||
2.x:: 5.z 6.z 5.z | 7.z 7.z 8.z ;
|
||||
all: 15.x 1.x
|
||||
15.x:: 5.z 6.z 5.z | 7.z 7.z 8.z ;
|
||||
1.x:: 1.z 2.z 2.z | 3.z 4.z ;
|
||||
2.x 1.x:: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
15.x 1.x:: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*,%=$$%) ;
|
||||
%.z: ;
|
||||
!, '',
|
||||
"@=2.x,<=,^=,+=,|=,?=,*=,%=
|
||||
"@=15.x,<=,^=,+=,|=,?=,*=,%=
|
||||
@=1.x,<=,^=,+=,|=,?=,*=,%=
|
||||
#MAKE#: Nothing to be done for 'all'.\n");
|
||||
|
||||
|
|
|
@ -388,13 +388,13 @@ all: 2.x
|
|||
# subtest 4. Static pattern rules. 2nd rule.
|
||||
run_make_test(q!
|
||||
.SECONDEXPANSION:
|
||||
all: 2.x 1.x
|
||||
2.x: 5.z 6.z 5.z | 7.z 7.z 8.z
|
||||
all: 15.x 1.x
|
||||
15.x: 5.z 6.z 5.z | 7.z 7.z 8.z
|
||||
1.x: 1.z 2.z 2.z | 3.z 4.z
|
||||
2.x 1.x: %.x: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*) ;
|
||||
15.x 1.x: %.x: 9.z $$(info @=$$@,<=$$<,^=$$^,+=$$+,|=$$|,?=$$?,*=$$*) ;
|
||||
%.z: ;
|
||||
!, '',
|
||||
"@=2.x,<=5.z,^=5.z 6.z,+=5.z 6.z 5.z,|=7.z 8.z,?=,*=2
|
||||
"@=15.x,<=5.z,^=5.z 6.z,+=5.z 6.z 5.z,|=7.z 8.z,?=,*=15
|
||||
@=1.x,<=1.z,^=1.z 2.z,+=1.z 2.z 2.z,|=3.z 4.z,?=,*=1
|
||||
#MAKE#: Nothing to be done for 'all'.\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue