test: Move scaffold/tests into lib.

* lib/tests/scaffold: Move from scaffold/tests.
* scaffold/tests: Remove.
* build-aux/check-mescc.sh: Update.
This commit is contained in:
Jan Nieuwenhuizen 2019-06-08 15:34:44 +02:00
parent 44f44aa099
commit 3ef5212238
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
162 changed files with 174 additions and 177 deletions

View file

@ -26,170 +26,170 @@ set -e
test_sh=${test_sh-${srcdest}build-aux/test.sh} test_sh=${test_sh-${srcdest}build-aux/test.sh}
tests=" tests="
scaffold/tests/t lib/tests/scaffold/t
scaffold/tests/00-exit-0 lib/tests/scaffold/00-exit-0
scaffold/tests/01-return-0 lib/tests/scaffold/01-return-0
scaffold/tests/02-return-1 lib/tests/scaffold/02-return-1
scaffold/tests/03-call lib/tests/scaffold/03-call
scaffold/tests/04-call-0 lib/tests/scaffold/04-call-0
scaffold/tests/05-call-1 lib/tests/scaffold/05-call-1
scaffold/tests/06-call-not-1 lib/tests/scaffold/06-call-not-1
scaffold/tests/06-not-call-1 lib/tests/scaffold/06-not-call-1
scaffold/tests/06-call-2 lib/tests/scaffold/06-call-2
scaffold/tests/06-call-string lib/tests/scaffold/06-call-string
scaffold/tests/06-call-variable lib/tests/scaffold/06-call-variable
scaffold/tests/06-return-void lib/tests/scaffold/06-return-void
scaffold/tests/07-include lib/tests/scaffold/07-include
scaffold/tests/08-assign lib/tests/scaffold/08-assign
scaffold/tests/08-assign-negative lib/tests/scaffold/08-assign-negative
scaffold/tests/08-assign-global lib/tests/scaffold/08-assign-global
scaffold/tests/10-if-0 lib/tests/scaffold/10-if-0
scaffold/tests/11-if-1 lib/tests/scaffold/11-if-1
scaffold/tests/12-if-eq lib/tests/scaffold/12-if-eq
scaffold/tests/13-if-neq lib/tests/scaffold/13-if-neq
scaffold/tests/14-if-goto lib/tests/scaffold/14-if-goto
scaffold/tests/15-if-not-f lib/tests/scaffold/15-if-not-f
scaffold/tests/16-if-t lib/tests/scaffold/16-if-t
scaffold/tests/17-compare-char lib/tests/scaffold/17-compare-char
scaffold/tests/17-compare-ge lib/tests/scaffold/17-compare-ge
scaffold/tests/17-compare-gt lib/tests/scaffold/17-compare-gt
scaffold/tests/17-compare-le lib/tests/scaffold/17-compare-le
scaffold/tests/17-compare-lt lib/tests/scaffold/17-compare-lt
scaffold/tests/17-compare-unsigned-ge lib/tests/scaffold/17-compare-unsigned-ge
scaffold/tests/17-compare-unsigned-gt lib/tests/scaffold/17-compare-unsigned-gt
scaffold/tests/17-compare-unsigned-le lib/tests/scaffold/17-compare-unsigned-le
scaffold/tests/17-compare-unsigned-lt lib/tests/scaffold/17-compare-unsigned-lt
scaffold/tests/17-compare-unsigned-char-le lib/tests/scaffold/17-compare-unsigned-char-le
scaffold/tests/17-compare-unsigned-short-le lib/tests/scaffold/17-compare-unsigned-short-le
scaffold/tests/17-compare-unsigned-long-le lib/tests/scaffold/17-compare-unsigned-long-le
scaffold/tests/17-compare-and lib/tests/scaffold/17-compare-and
scaffold/tests/17-compare-or lib/tests/scaffold/17-compare-or
scaffold/tests/17-compare-and-or lib/tests/scaffold/17-compare-and-or
scaffold/tests/17-compare-assign lib/tests/scaffold/17-compare-assign
scaffold/tests/17-compare-call lib/tests/scaffold/17-compare-call
scaffold/tests/18-assign-shadow lib/tests/scaffold/18-assign-shadow
scaffold/tests/20-while lib/tests/scaffold/20-while
scaffold/tests/21-char-array-simple lib/tests/scaffold/21-char-array-simple
scaffold/tests/21-char-array lib/tests/scaffold/21-char-array
scaffold/tests/22-while-char-array lib/tests/scaffold/22-while-char-array
scaffold/tests/23-global-pointer-init-null lib/tests/scaffold/23-global-pointer-init-null
scaffold/tests/23-global-pointer-init lib/tests/scaffold/23-global-pointer-init
scaffold/tests/23-global-pointer-ref lib/tests/scaffold/23-global-pointer-ref
scaffold/tests/23-global-pointer-pointer-ref lib/tests/scaffold/23-global-pointer-pointer-ref
scaffold/tests/23-pointer-sub lib/tests/scaffold/23-pointer-sub
scaffold/tests/23-pointer lib/tests/scaffold/23-pointer
lib/tests/mes/30-oputs lib/tests/mes/30-oputs
lib/tests/string/30-strlen lib/tests/string/30-strlen
scaffold/tests/32-call-wrap lib/tests/scaffold/32-call-wrap
scaffold/tests/32-compare lib/tests/scaffold/32-compare
scaffold/tests/33-and-or lib/tests/scaffold/33-and-or
scaffold/tests/34-pre-post lib/tests/scaffold/34-pre-post
scaffold/tests/35-compare-char lib/tests/scaffold/35-compare-char
scaffold/tests/36-compare-arithmetic lib/tests/scaffold/36-compare-arithmetic
scaffold/tests/37-compare-assign lib/tests/scaffold/37-compare-assign
scaffold/tests/38-compare-call-2 lib/tests/scaffold/38-compare-call-2
scaffold/tests/38-compare-call-3 lib/tests/scaffold/38-compare-call-3
scaffold/tests/38-compare-call lib/tests/scaffold/38-compare-call
scaffold/tests/40-if-else lib/tests/scaffold/40-if-else
scaffold/tests/41-ternary lib/tests/scaffold/41-ternary
scaffold/tests/42-goto-label lib/tests/scaffold/42-goto-label
scaffold/tests/43-for-do-while lib/tests/scaffold/43-for-do-while
scaffold/tests/44-switch lib/tests/scaffold/44-switch
scaffold/tests/44-switch-fallthrough lib/tests/scaffold/44-switch-fallthrough
scaffold/tests/44-switch-body-fallthrough lib/tests/scaffold/44-switch-body-fallthrough
scaffold/tests/45-void-call lib/tests/scaffold/45-void-call
scaffold/tests/46-function-static lib/tests/scaffold/46-function-static
scaffold/tests/47-function-expression lib/tests/scaffold/47-function-expression
scaffold/tests/48-global-static lib/tests/scaffold/48-global-static
lib/tests/assert/50-assert lib/tests/assert/50-assert
lib/tests/mes/50-itoa lib/tests/mes/50-itoa
lib/tests/posix/50-getenv lib/tests/posix/50-getenv
lib/tests/string/50-strcmp lib/tests/string/50-strcmp
lib/tests/string/50-strcpy lib/tests/string/50-strcpy
lib/tests/string/50-strncmp lib/tests/string/50-strncmp
scaffold/tests/51-pointer-sub lib/tests/scaffold/51-pointer-sub
scaffold/tests/54-argc lib/tests/scaffold/54-argc
scaffold/tests/54-argv lib/tests/scaffold/54-argv
scaffold/tests/55-char-array lib/tests/scaffold/55-char-array
scaffold/tests/60-math lib/tests/scaffold/60-math
scaffold/tests/61-array lib/tests/scaffold/61-array
scaffold/tests/62-array lib/tests/scaffold/62-array
scaffold/tests/63-struct lib/tests/scaffold/63-struct
scaffold/tests/63-struct-pointer lib/tests/scaffold/63-struct-pointer
scaffold/tests/63-struct-local lib/tests/scaffold/63-struct-local
scaffold/tests/63-struct-function lib/tests/scaffold/63-struct-function
scaffold/tests/63-struct-assign lib/tests/scaffold/63-struct-assign
scaffold/tests/63-struct-array lib/tests/scaffold/63-struct-array
scaffold/tests/63-struct-array-assign lib/tests/scaffold/63-struct-array-assign
scaffold/tests/63-struct-array-compare lib/tests/scaffold/63-struct-array-compare
scaffold/tests/63-struct-cell lib/tests/scaffold/63-struct-cell
scaffold/tests/64-make-cell lib/tests/scaffold/64-make-cell
scaffold/tests/65-read lib/tests/scaffold/65-read
scaffold/tests/66-local-char-array lib/tests/scaffold/66-local-char-array
scaffold/tests/70-stdarg lib/tests/scaffold/70-stdarg
lib/tests/stdio/70-printf-hello lib/tests/stdio/70-printf-hello
lib/tests/stdio/70-printf-simple lib/tests/stdio/70-printf-simple
lib/tests/stdio/70-printf lib/tests/stdio/70-printf
lib/tests/stdlib/70-strtoull lib/tests/stdlib/70-strtoull
lib/tests/string/70-strchr lib/tests/string/70-strchr
scaffold/tests/71-struct-array lib/tests/scaffold/71-struct-array
scaffold/tests/72-typedef-struct-def lib/tests/scaffold/72-typedef-struct-def
scaffold/tests/73-union-hello lib/tests/scaffold/73-union-hello
scaffold/tests/73-union lib/tests/scaffold/73-union
scaffold/tests/74-multi-line-string lib/tests/scaffold/74-multi-line-string
scaffold/tests/75-struct-union lib/tests/scaffold/75-struct-union
scaffold/tests/76-pointer-arithmetic-pp lib/tests/scaffold/76-pointer-arithmetic-pp
scaffold/tests/76-pointer-arithmetic lib/tests/scaffold/76-pointer-arithmetic
scaffold/tests/77-pointer-assign lib/tests/scaffold/77-pointer-assign
scaffold/tests/78-union-struct lib/tests/scaffold/78-union-struct
scaffold/tests/79-int-array-simple lib/tests/scaffold/79-int-array-simple
scaffold/tests/79-int-array lib/tests/scaffold/79-int-array
scaffold/tests/7a-struct-char-array lib/tests/scaffold/7a-struct-char-array
scaffold/tests/7b-struct-int-array-hello lib/tests/scaffold/7b-struct-int-array-hello
scaffold/tests/7b-struct-int-array-pointer lib/tests/scaffold/7b-struct-int-array-pointer
scaffold/tests/7b-struct-int-array lib/tests/scaffold/7b-struct-int-array
scaffold/tests/7c-dynarray lib/tests/scaffold/7c-dynarray
scaffold/tests/7d-cast-char lib/tests/scaffold/7d-cast-char
scaffold/tests/7e-struct-array-access lib/tests/scaffold/7e-struct-array-access
scaffold/tests/7f-struct-pointer-arithmetic lib/tests/scaffold/7f-struct-pointer-arithmetic
scaffold/tests/7g-struct-byte-word-field lib/tests/scaffold/7g-struct-byte-word-field
scaffold/tests/7h-struct-assign lib/tests/scaffold/7h-struct-assign
scaffold/tests/7i-struct-struct-simple lib/tests/scaffold/7i-struct-struct-simple
scaffold/tests/7i-struct-struct lib/tests/scaffold/7i-struct-struct
scaffold/tests/7k-empty-for lib/tests/scaffold/7k-empty-for
scaffold/tests/7k-for-each-elem-simple lib/tests/scaffold/7k-for-each-elem-simple
scaffold/tests/7k-for-each-elem lib/tests/scaffold/7k-for-each-elem
scaffold/tests/7l-struct-any-size-array-simple lib/tests/scaffold/7l-struct-any-size-array-simple
scaffold/tests/7l-struct-any-size-array lib/tests/scaffold/7l-struct-any-size-array
scaffold/tests/7m-struct-char-array-assign lib/tests/scaffold/7m-struct-char-array-assign
scaffold/tests/7n-struct-struct-array lib/tests/scaffold/7n-struct-struct-array
scaffold/tests/7o-struct-pre-post-simple lib/tests/scaffold/7o-struct-pre-post-simple
scaffold/tests/7o-struct-pre-post lib/tests/scaffold/7o-struct-pre-post
scaffold/tests/7p-struct-cast lib/tests/scaffold/7p-struct-cast
scaffold/tests/7q-bit-field-simple lib/tests/scaffold/7q-bit-field-simple
scaffold/tests/7q-bit-field lib/tests/scaffold/7q-bit-field
scaffold/tests/7r-sign-extend lib/tests/scaffold/7r-sign-extend
scaffold/tests/7s-struct-short lib/tests/scaffold/7s-struct-short
scaffold/tests/7s-unsigned-compare lib/tests/scaffold/7s-unsigned-compare
scaffold/tests/7t-function-destruct lib/tests/scaffold/7t-function-destruct
scaffold/tests/7u-double lib/tests/scaffold/7u-double
scaffold/tests/7u-long-long lib/tests/scaffold/7u-long-long
scaffold/tests/7u-ternary-expression lib/tests/scaffold/7u-ternary-expression
scaffold/tests/7u-call-ternary lib/tests/scaffold/7u-call-ternary
scaffold/tests/7u-inc-byte-word lib/tests/scaffold/7u-inc-byte-word
scaffold/tests/7u-struct-func lib/tests/scaffold/7u-struct-func
scaffold/tests/7u-struct-size10 lib/tests/scaffold/7u-struct-size10
scaffold/tests/7u-vstack lib/tests/scaffold/7u-vstack
lib/tests/setjmp/80-setjmp lib/tests/setjmp/80-setjmp
lib/tests/stdio/80-sscanf lib/tests/stdio/80-sscanf
lib/tests/stdlib/80-qsort lib/tests/stdlib/80-qsort
lib/tests/stdlib/80-qsort-dupes lib/tests/stdlib/80-qsort-dupes
lib/tests/string/80-strncpy lib/tests/string/80-strncpy
lib/tests/string/80-strrchr lib/tests/string/80-strrchr
scaffold/tests/82-define lib/tests/scaffold/82-define
scaffold/tests/83-heterogenoous-init lib/tests/scaffold/83-heterogenoous-init
scaffold/tests/84-struct-field-list lib/tests/scaffold/84-struct-field-list
scaffold/tests/85-sizeof lib/tests/scaffold/85-sizeof
lib/tests/dirent/90-readdir lib/tests/dirent/90-readdir
lib/tests/io/90-stat lib/tests/io/90-stat
lib/tests/posix/90-unsetenv lib/tests/posix/90-unsetenv
@ -202,39 +202,39 @@ lib/tests/stdlib/90-strtol
lib/tests/string/90-snprintf lib/tests/string/90-snprintf
lib/tests/string/90-strpbrk lib/tests/string/90-strpbrk
lib/tests/string/90-strspn lib/tests/string/90-strspn
scaffold/tests/a0-call-trunc-char lib/tests/scaffold/a0-call-trunc-char
scaffold/tests/a0-call-trunc-short lib/tests/scaffold/a0-call-trunc-short
scaffold/tests/a0-call-trunc-int lib/tests/scaffold/a0-call-trunc-int
scaffold/tests/a0-math-divide-signed-negative lib/tests/scaffold/a0-math-divide-signed-negative
scaffold/tests/a1-global-no-align lib/tests/scaffold/a1-global-no-align
scaffold/tests/a1-global-no-clobber lib/tests/scaffold/a1-global-no-clobber
" "
broken="$broken broken="$broken
lib/tests/scaffold/17-compare-unsigned-char-le
lib/tests/scaffold/17-compare-unsigned-short-le
lib/tests/scaffold/66-local-char-array
lib/tests/scaffold/a0-call-trunc-int
lib/tests/scaffold/a0-math-divide-signed-negative
lib/tests/posix/50-getenv lib/tests/posix/50-getenv
scaffold/tests/17-compare-unsigned-char-le
scaffold/tests/17-compare-unsigned-short-le
scaffold/tests/66-local-char-array
scaffold/tests/a0-call-trunc-int
scaffold/tests/a0-math-divide-signed-negative
" "
if [ "$mes_arch" = "x86_64-gcc" ]; then if [ "$mes_arch" = "x86_64-gcc" ]; then
broken="$broken broken="$broken
scaffold/tests/21-char-array lib/tests/scaffold/21-char-array
scaffold/tests/41-ternary lib/tests/scaffold/41-ternary
scaffold/tests/stdio/70-printf-stdarg lib/tests/scaffold/stdio/70-printf-stdarg
scaffold/tests/stdio/70-printf-simple lib/tests/scaffold/stdio/70-printf-simple
scaffold/tests/stdio/70-printf lib/tests/scaffold/stdio/70-printf
lib/tests/setjmp/80-setjmp lib/tests/setjmp/80-setjmp
scaffold/tests/a1-global-no-align lib/tests/scaffold/a1-global-no-align
" "
# Debian: debugme itoa is broken # Debian: debugme itoa is broken
broken="$broken broken="$broken
scaffold/tests/47-function-expression lib/tests/scaffold/47-function-expression
scaffold/tests/62-array lib/tests/scaffold/62-array
scaffold/tests/65-read lib/tests/scaffold/65-read
scaffold/tests/85-sizeof lib/tests/scaffold/85-sizeof
lib/tests/mes/90-abtod lib/tests/mes/90-abtod
lib/tests/mes/90-dtoab lib/tests/mes/90-dtoab
lib/tests/posix/90-execlp lib/tests/posix/90-execlp

View file

@ -34,20 +34,20 @@ qsort_strcmp (void const *a, void const *b)
int int
main () main ()
{ {
DIR *d = opendir ("lib/tests/dirent/readdir-fu"); DIR *d = opendir ("../lib/tests/dirent/readdir-fu");
if (d) if (d)
return 1; return 1;
if (errno != ENOENT) if (errno != ENOENT)
return 2; return 2;
d = opendir ("lib/tests/dirent/90-readdir.c"); d = opendir ("../lib/tests/dirent/90-readdir.c");
if (d) if (d)
return 3; return 3;
if (errno != ENOTDIR) if (errno != ENOTDIR)
return 4; return 4;
errno = 0; errno = 0;
d = opendir ("lib/tests/dirent/readdir.dir"); d = opendir ("../lib/tests/dirent/readdir.dir");
if (!d) if (!d)
return 5; return 5;

View file

@ -66,7 +66,7 @@ main ()
// char *name = "boo"; // char *name = "boo";
// errno = 0; // errno = 0;
// fprintf (stderr, "%s: %s\n", name, strerror (errno)); // fprintf (stderr, "%s: %s\n", name, strerror (errno));
int fd = open ("COPYING", 0); int fd = open ("../COPYING", 0);
struct stat sbuf; struct stat sbuf;

View file

@ -27,11 +27,11 @@ int
main (int argc, char *argv[]) main (int argc, char *argv[])
{ {
oputs ("\n"); oputs ("\n");
oputs ("t: argv[0] == \"scaffold/test....\"\n"); oputs ("t: argv[0] == \"test/scaffold....\"\n");
oputs ("argv0="); oputs ("argv0=");
oputs (argv[0]); oputs (argv[0]);
oputs ("\n"); oputs ("\n");
if (strncmp (argv[0], "scaffold/test", 5)) if (strncmp (argv[0], "test/scaffold", 5))
return 1; return 1;
oputs ("t: *argv\"\n"); oputs ("t: *argv\"\n");

Some files were not shown because too many files have changed in this diff Show more