Move test/src/*.exe to test/exe/*.exe so that directory name test/src can be specifie...
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Thu, 5 May 2016 00:05:54 +0000 (09:05 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Fri, 17 Jun 2016 10:35:44 +0000 (19:35 +0900)
Makefile.am
test/Makefile.in
test/runsuite.c
test/tests
test/win.mak

index cff968e3dbabf855b2116c5ce96348957629208b..db86ec90b0962a536284afc4580e31cf9436abe0 100644 (file)
@@ -86,114 +86,17 @@ EXTRA_DIST = license.txt readme.txt readme_winbuild.txt \
    winbuild/psqlodbc.vcxproj \
    winbuild/readme.txt \
 \
-   test/expected/alter.out \
-   test/expected/arraybinding.out \
-   test/expected/bindcol.out \
-   test/expected/bookmark.out \
-   test/expected/boolsaschar.out \
-   test/expected/bulkoperations.out \
-   test/expected/catalogfunctions.out \
-   test/expected/colattribute.out \
-   test/expected/colattribute_1.out \
-   test/expected/commands.out \
-   test/expected/connect.out \
-   test/expected/cte.out \
-   test/expected/cursor-commit.out \
-   test/expected/cursor-movement.out \
-   test/expected/cursor-movement_1.out \
-   test/expected/cursor-name.out \
-   test/expected/cursors.out \
-   test/expected/cursors_1.out \
-   test/expected/cvtnulldate.out \
-   test/expected/dataatexecution.out \
-   test/expected/declare-fetch-commit.out \
-   test/expected/declare-fetch-block.out \
-   test/expected/deprecated.out \
-   test/expected/deprecated_1.out \
-   test/expected/diagnostic.out \
-   test/expected/error-rollback.out \
-   test/expected/errors.out \
-   test/expected/errors_1.out \
-   test/expected/errors_2.out \
-   test/expected/getresult.out \
-   test/expected/identity.out \
-   test/expected/insertreturning.out \
-   test/expected/large-object-data-at-exec.out \
-   test/expected/large-object.out \
-   test/expected/lfconversion.out \
-   test/expected/multistmt.out \
-   test/expected/notice.out \
-   test/expected/numeric.out \
-   test/expected/odbc-escapes.out \
-   test/expected/param-conversions.out \
-   test/expected/param-conversions_1.out \
-   test/expected/params.out \
-   test/expected/params_1.out \
-   test/expected/parse.out \
-   test/expected/positioned-update.out \
-   test/expected/premature.out \
-   test/expected/prepare.out \
-   test/expected/quotes.out \
-   test/expected/result-conversions.out \
-   test/expected/result-conversions_1.out \
-   test/expected/select.out \
-   test/expected/stmthandles.out \
-   test/expected/update.out \
    test/Makefile.in \
    test/odbcini-gen.sh \
    test/README.txt \
    test/reset-db.c \
    test/runsuite.c \
    test/sampletables.sql \
-   test/src/alter-test.c \
-   test/src/arraybinding-test.c \
-   test/src/bindcol-test.c \
-   test/src/bookmark-test.c \
-   test/src/boolsaschar-test.c \
-   test/src/bulkoperations-test.c \
-   test/src/catalogfunctions-test.c \
-   test/src/colattribute-test.c \
-   test/src/commands-test.c \
-   test/src/common.c \
-   test/src/common.h \
-   test/src/connect-test.c \
-   test/src/cte-test.c \
-   test/src/cursor-commit-test.c \
-   test/src/cursor-movement-test.c \
-   test/src/cursor-name-test.c \
-   test/src/cursors-test.c \
-   test/src/errors-test.c \
-   test/src/cvtnulldate-test.c \
-   test/src/dataatexecution-test.c \
-   test/src/declare-fetch-commit-test.c \
-   test/src/declare-fetch-block-test.c \
-   test/src/deprecated-test.c \
-   test/src/diagnostic-test.c \
-   test/src/error-rollback-test.c \
-   test/src/getresult-test.c \
-   test/src/identity-test.c \
-   test/src/insertreturning-test.c \
-   test/src/large-object-data-at-exec-test.c \
-   test/src/large-object-test.c \
-   test/src/lfconversion-test.c \
-   test/src/multistmt-test.c \
-   test/src/notice-test.c \
-   test/src/numeric-test.c \
-   test/src/odbc-escapes-test.c \
-   test/src/param-conversions-test.c \
-   test/src/params-test.c \
-   test/src/parse-test.c \
-   test/src/positioned-update-test.c \
-   test/src/premature-test.c \
-   test/src/prepare-test.c \
-   test/src/quotes-test.c \
-   test/src/result-conversions-test.c \
-   test/src/select-test.c \
-   test/src/stmthandles-test.c \
-   test/src/update-test.c \
    test/tests \
    test/win.mak \
-   test/Makefile 
+   test/Makefile \
+   test/expected \
+   test/src 
 
 MAINTAINERCLEANFILES = \
    Makefile.in config/config.guess config.h.in config/config.sub configure \
index 2adb0403012b9dfa7a2e124d114fb0c47da4c76b..87106167544d431427d5b46e0bffb52b659cb905 100644 (file)
@@ -9,8 +9,8 @@ vpath %.sh $(origdir)
 include $(origdir)/tests
 
 # The included file defined variable TESTBINS, which is a list of program
-# names in format src/<testname>-test. Extract the base test names from it.
-TESTNAMES = $(patsubst src/%-test,%, $(TESTBINS))
+# names in format exe/<testname>-test. Extract the base test names from it.
+TESTNAMES = $(patsubst exe/%-test,%, $(TESTBINS))
 
 # Set by autoconf
 LDFLAGS = @LDFLAGS@
@@ -44,13 +44,13 @@ runsuite: runsuite.c
 reset-db: reset-db.c
    $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LIBODBC)
 
-src/common.o: src/common.c
-   @if test ! -d src; then mkdir -p src; fi
+exe/common.o: src/common.c
+   @if test ! -d exe; then mkdir -p exe; fi
    $(COMPILE.c) -c $< -o $@
 
 # For each test, compile the .c file.
-src/%-test: src/%-test.c src/common.o
-   $(CC) $(CFLAGS) $(LDFLAGS) $^ -o src/$*-test $(LIBODBC)
+exe/%-test: src/%-test.c exe/common.o
+   $(CC) $(CFLAGS) $(LDFLAGS) $^ -o exe/$*-test $(LIBODBC)
 
 # This target runs the regression tests with all combinations of
 # UseDeclareFetch, UseServerSidePrepare and Protocol options.
@@ -84,5 +84,5 @@ installcheck-all:
    $(MAKE) installcheck odbc_ini_extras="UseDeclareFetch=1 UseServerSidePrepare=0 Protocol=7.4-0"
 
 clean:
-   rm -f $(TESTBINS) src/*.o runsuite reset-db
+   rm -f $(TESTBINS) exe/*.o runsuite reset-db
    rm -f results/*
index b62fd32e65decc78eb2284d315badbcfdb74b866..583cf35f5301ccda2c741f0d8e627ace81993352 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * A test driver for the psqlodbc regression tests.
  *
- * This program runs one regression tests from the src/ directory,
+ * This program runs one regression tests from the exe/ directory,
  * and compares the output with the expected output in the expected/ directory.
  * Reports success or failure in TAP compatible fashion.
  */
@@ -65,7 +65,7 @@ parse_argument(const char *in, char *testname, char *binname)
    if (strchr(in, DIR_SEP) == NULL)
    {
        strcpy(testname, in);
-       sprintf(binname, "src%c%s-test", DIR_SEP, in);
+       sprintf(binname, "exe%c%s-test", DIR_SEP, in);
        return;
    }
 
index d5b2fdfd8612b99fe07fb1b86f330b09d08ac120..a06a5755a51f3ab8176efd90788a2ae9a0bdd76d 100644 (file)
@@ -3,52 +3,52 @@
 # This is in a separate file so that it can be included by both the Unix
 # Makefile, and Windows nmake file, win.mak. Note that the format of this
 # file must be acceptable to both, so don't add anything fancy here. That's
-# also why we list program names here, in format src/<testname>-test, rather
+# also why we list program names here, in format exe/<testname>-test, rather
 # than the base test names: nmake makes it difficult to add a prefix or suffix
 # to each name in a list, but it's easy to strip them away.
 
-TESTBINS = src/connect-test \
-   src/stmthandles-test \
-   src/select-test \
-   src/update-test \
-   src/commands-test \
-   src/multistmt-test \
-   src/getresult-test \
-   src/colattribute-test \
-   src/result-conversions-test \
-   src/prepare-test \
-   src/premature-test \
-   src/params-test \
-   src/param-conversions-test \
-   src/parse-test \
-   src/identity-test \
-   src/notice-test \
-   src/arraybinding-test \
-   src/insertreturning-test \
-   src/dataatexecution-test \
-   src/boolsaschar-test \
-   src/cvtnulldate-test \
-   src/alter-test \
-   src/quotes-test \
-   src/cursors-test \
-   src/cursor-movement-test \
-   src/cursor-commit-test \
-   src/cursor-name-test \
-   src/cursor-block-delete-test \
-   src/bookmark-test \
-   src/declare-fetch-commit-test \
-   src/declare-fetch-block-test \
-   src/positioned-update-test \
-   src/bulkoperations-test \
-   src/catalogfunctions-test \
-   src/bindcol-test \
-   src/lfconversion-test \
-   src/cte-test \
-   src/deprecated-test \
-   src/errors-test \
-   src/error-rollback-test \
-   src/diagnostic-test \
-   src/numeric-test \
-   src/large-object-test \
-   src/large-object-data-at-exec-test \
-   src/odbc-escapes-test
+TESTBINS = exe/connect-test \
+   exe/stmthandles-test \
+   exe/select-test \
+   exe/update-test \
+   exe/commands-test \
+   exe/multistmt-test \
+   exe/getresult-test \
+   exe/colattribute-test \
+   exe/result-conversions-test \
+   exe/prepare-test \
+   exe/premature-test \
+   exe/params-test \
+   exe/param-conversions-test \
+   exe/parse-test \
+   exe/identity-test \
+   exe/notice-test \
+   exe/arraybinding-test \
+   exe/insertreturning-test \
+   exe/dataatexecution-test \
+   exe/boolsaschar-test \
+   exe/cvtnulldate-test \
+   exe/alter-test \
+   exe/quotes-test \
+   exe/cursors-test \
+   exe/cursor-movement-test \
+   exe/cursor-commit-test \
+   exe/cursor-name-test \
+   exe/cursor-block-delete-test \
+   exe/bookmark-test \
+   exe/declare-fetch-commit-test \
+   exe/declare-fetch-block-test \
+   exe/positioned-update-test \
+   exe/bulkoperations-test \
+   exe/catalogfunctions-test \
+   exe/bindcol-test \
+   exe/lfconversion-test \
+   exe/cte-test \
+   exe/deprecated-test \
+   exe/errors-test \
+   exe/error-rollback-test \
+   exe/diagnostic-test \
+   exe/numeric-test \
+   exe/large-object-test \
+   exe/large-object-data-at-exec-test \
+   exe/odbc-escapes-test
index 0445301c5abc382d29718a934f0fdc499874c834..5e3858f77c1e0cad22f90575e67f34988e343683 100644 (file)
 !INCLUDE tests
 
 # The 'tests' file contains names of the test programs, in form
-# src/<testname>-test. Extract the base names of the tests, by stripping the
-# "src/" prefix and "-test" suffix. (It would seem more straightforward to do
+# exe/<testname>-test. Extract the base names of the tests, by stripping the
+# "exe/" prefix and "-test" suffix. (It would seem more straightforward to do
 # it the other way round, but it is surprisingly difficult to add a
 # prefix/suffix to a list in nmake. Removing them is much easier.)
-TESTS = $(TESTBINS:src/=)
+TESTS = $(TESTBINS:exe/=)
 TESTS = $(TESTS:-test=)
 
 # Now create names of the test .exe from the base names
 
-# src\<testname>.exe
+# exe\<testname>.exe
 TESTEXES = $(TESTBINS:-test=-test.exe)
-TESTEXES = $(TESTEXES:src/=src\)
+TESTEXES = $(TESTEXES:exe/=exe\)
 
 
 # Flags
@@ -46,7 +46,7 @@ LINKFLAGS=/link odbc32.lib odbccp32.lib
 # for each test - ideally we would build common.obj once and just link it
 # to each test.
 .c.exe:
-   cl /Fe.\src\ /Fo.\src\ $*.c src/common.c $(CLFLAGS) $(LINKFLAGS)
+   cl /Fe.\exe\ /Fo.\exe\ $*.c src/common.c $(CLFLAGS) $(LINKFLAGS)
 
 all: $(TESTEXES) runsuite.exe
 
@@ -66,5 +66,5 @@ installcheck: runsuite.exe $(TESTEXES) reset-db.exe
    .\runsuite $(TESTS)
 
 clean:
-   -del src\*.exe
-   -del src\*.obj
+   -del exe\*.exe
+   -del exe\*.obj