t/*: rearrange tests into numbered directories.
It was getting way too ad-hoc in there. Let's reorganize the tests so that there's a good, obvious, suggested sequence to run them in.
This commit is contained in:
parent
116c279e96
commit
7822f5a5bb
170 changed files with 100 additions and 80 deletions
5
t/110-compile/.gitignore
vendored
Normal file
5
t/110-compile/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
CC
|
||||
LD
|
||||
[yb]ellow
|
||||
hello
|
||||
*.o
|
||||
5
t/110-compile/CC.do
Normal file
5
t/110-compile/CC.do
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
exec >$3
|
||||
cat <<-EOF
|
||||
gcc -Wall -o /dev/fd/1 -c "\$1"
|
||||
EOF
|
||||
chmod a+x $3
|
||||
7
t/110-compile/LD.do
Normal file
7
t/110-compile/LD.do
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
exec >$3
|
||||
cat <<-EOF
|
||||
OUT="\$1"
|
||||
shift
|
||||
gcc -Wall -o "\$OUT" "\$@"
|
||||
EOF
|
||||
chmod a+x $3
|
||||
1
t/110-compile/all.do
Normal file
1
t/110-compile/all.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
redo-ifchange hello yellow bellow
|
||||
3
t/110-compile/bellow.do
Normal file
3
t/110-compile/bellow.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
redo-ifchange LD yellow.o
|
||||
./LD "$3" yellow.o
|
||||
../sleep 2
|
||||
3
t/110-compile/clean.do
Normal file
3
t/110-compile/clean.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
rm -f hello [by]ellow *.o CC LD *~ .*~
|
||||
|
||||
|
||||
7
t/110-compile/hello.c
Normal file
7
t/110-compile/hello.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("hello, world!\n");
|
||||
return 0;
|
||||
}
|
||||
3
t/110-compile/hello.do
Normal file
3
t/110-compile/hello.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
redo-ifchange LD hello.o
|
||||
../sleep 1
|
||||
./LD "$3" hello.o
|
||||
4
t/110-compile/hello.o.do
Normal file
4
t/110-compile/hello.o.do
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
redo-ifchange CC hello.c /usr/include/stdio.h
|
||||
redo-ifcreate stdio.h
|
||||
../sleep 3
|
||||
./CC hello.c
|
||||
3
t/110-compile/yellow.do
Normal file
3
t/110-compile/yellow.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
redo-ifchange LD yellow.o
|
||||
../sleep 1.5
|
||||
./LD "$3" yellow.o
|
||||
3
t/110-compile/yellow.o.do
Normal file
3
t/110-compile/yellow.o.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
redo-ifchange CC hello.c
|
||||
../sleep 2
|
||||
gcc -o $3 -c hello.c
|
||||
Loading…
Add table
Add a link
Reference in a new issue