summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch')
-rw-r--r--meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch51
1 files changed, 16 insertions, 35 deletions
diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
index a8f14e7689..30e67b7dfb 100644
--- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
+++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch
@@ -1,3 +1,6 @@
1From 96896b88776d0080609ec830cf9538d2babe665a Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Tue, 5 Sep 2017 10:24:10 +0800
1Subject: [PATCH] psqlodbc: fixes for ptest support 4Subject: [PATCH] psqlodbc: fixes for ptest support
2 5
3* Fix the LIBODBC since we don't use ODBC_CONFIG. 6* Fix the LIBODBC since we don't use ODBC_CONFIG.
@@ -9,27 +12,28 @@ Subject: [PATCH] psqlodbc: fixes for ptest support
9Upstream-Status: Inappropriate [OE ptest specific] 12Upstream-Status: Inappropriate [OE ptest specific]
10 13
11Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 14Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
15
12--- 16---
13 test/Makefile.in | 2 +- 17 test/Makefile.in | 2 +-
14 test/odbcini-gen.sh | 8 ++++---- 18 test/odbcini-gen.sh | 8 ++++----
15 test/runsuite.c | 26 +++++++++++++------------- 19 test/runsuite.c | 20 ++++++++++----------
16 3 files changed, 18 insertions(+), 18 deletions(-) 20 3 files changed, 15 insertions(+), 15 deletions(-)
17 21
18diff --git a/test/Makefile.in b/test/Makefile.in 22diff --git a/test/Makefile.in b/test/Makefile.in
19index 8710616..fcb470e 100644 23index 3f9a9af..09406ae 100644
20--- a/test/Makefile.in 24--- a/test/Makefile.in
21+++ b/test/Makefile.in 25+++ b/test/Makefile.in
22@@ -18,7 +18,7 @@ CFLAGS = @CFLAGS@ 26@@ -19,7 +19,7 @@ CPPFLAGS = @CPPFLAGS@ -I.. # config.h
23 ODBC_CONFIG = @ODBC_CONFIG@ 27 ODBC_CONFIG = @ODBC_CONFIG@
24 PROVE = @PROVE@ 28 PROVE = @PROVE@
25 29
26-LIBODBC := $(shell $(ODBC_CONFIG) --libs) 30-LIBODBC = @LIBODBC@
27+LIBODBC = -lodbc 31+LIBODBC = -lodbc
28 32
29 all: $(TESTBINS) runsuite reset-db 33 all: $(TESTBINS) runsuite reset-db
30 34
31diff --git a/test/odbcini-gen.sh b/test/odbcini-gen.sh 35diff --git a/test/odbcini-gen.sh b/test/odbcini-gen.sh
32index d2c2c87..6068d9d 100755 36index 2eaba35..6555cdb 100755
33--- a/test/odbcini-gen.sh 37--- a/test/odbcini-gen.sh
34+++ b/test/odbcini-gen.sh 38+++ b/test/odbcini-gen.sh
35@@ -6,7 +6,7 @@ 39@@ -6,7 +6,7 @@
@@ -41,7 +45,7 @@ index d2c2c87..6068d9d 100755
41 driver=${drvr}.so 45 driver=${drvr}.so
42 if test ! -e $driver ; then 46 if test ! -e $driver ; then
43 driver=${drvr}.dll 47 driver=${drvr}.dll
44@@ -33,10 +33,10 @@ Driver = psqlodbc test driver 48@@ -52,10 +52,10 @@ Driver = PostgreSQL Unicode
45 Trace = No 49 Trace = No
46 TraceFile = 50 TraceFile =
47 Database = contrib_regression 51 Database = contrib_regression
@@ -56,10 +60,10 @@ index d2c2c87..6068d9d 100755
56 RowVersioning = No 60 RowVersioning = No
57 ShowSystemTables = No 61 ShowSystemTables = No
58diff --git a/test/runsuite.c b/test/runsuite.c 62diff --git a/test/runsuite.c b/test/runsuite.c
59index 583cf35..fd2a90e 100644 63index 3be5732..cd842dc 100644
60--- a/test/runsuite.c 64--- a/test/runsuite.c
61+++ b/test/runsuite.c 65+++ b/test/runsuite.c
62@@ -51,7 +51,7 @@ bailout(const char *fmt, ...) 66@@ -55,7 +55,7 @@ bailout(const char *fmt, ...)
63 67
64 /* Given a test program's name, get the test name */ 68 /* Given a test program's name, get the test name */
65 void 69 void
@@ -68,7 +72,7 @@ index 583cf35..fd2a90e 100644
68 { 72 {
69 const char *basename; 73 const char *basename;
70 #ifdef WIN32 74 #ifdef WIN32
71@@ -65,7 +65,7 @@ parse_argument(const char *in, char *testname, char *binname) 75@@ -69,7 +69,7 @@ parse_argument(const char *in, char *testname, char *binname)
72 if (strchr(in, DIR_SEP) == NULL) 76 if (strchr(in, DIR_SEP) == NULL)
73 { 77 {
74 strcpy(testname, in); 78 strcpy(testname, in);
@@ -77,7 +81,7 @@ index 583cf35..fd2a90e 100644
77 return; 81 return;
78 } 82 }
79 83
80@@ -127,7 +127,7 @@ int main(int argc, char **argv) 84@@ -131,7 +131,7 @@ int main(int argc, char **argv)
81 failures = 0; 85 failures = 0;
82 for (i = 1, j = 1; i <= numtests; i++, j++) 86 for (i = 1, j = 1; i <= numtests; i++, j++)
83 { 87 {
@@ -86,7 +90,7 @@ index 583cf35..fd2a90e 100644
86 if (runtest(binname, testname, i, inputdir) != 0) 90 if (runtest(binname, testname, i, inputdir) != 0)
87 failures++; 91 failures++;
88 } 92 }
89@@ -157,29 +157,29 @@ runtest(const char *binname, const char *testname, int testno, const char *input 93@@ -161,29 +161,29 @@ runtest(const char *binname, const char *testname, int testno, const char *input
90 #ifndef WIN32 94 #ifndef WIN32
91 snprintf(cmdline, sizeof(cmdline), 95 snprintf(cmdline, sizeof(cmdline),
92 "ODBCSYSINI=. ODBCINSTINI=./odbcinst.ini ODBCINI=./odbc.ini " 96 "ODBCSYSINI=. ODBCINSTINI=./odbcinst.ini ODBCINI=./odbc.ini "
@@ -123,26 +127,3 @@ index 583cf35..fd2a90e 100644
123 ret = 0; 127 ret = 0;
124 } 128 }
125 fflush(stdout); 129 fflush(stdout);
126@@ -196,7 +196,7 @@ rundiff(const char *testname, const char *inputdir)
127 char *result;
128 size_t result_len;
129
130- snprintf(filename, sizeof(filename), "results/%s.out", testname);
131+ snprintf(filename, sizeof(filename), "%s/results/%s.out", inputdir, testname);
132 result = slurpfile(filename, &result_len);
133
134 outputno = 0;
135@@ -244,8 +244,8 @@ rundiff(const char *testname, const char *inputdir)
136 * files and print the smallest diff?
137 */
138 snprintf(cmdline, sizeof(cmdline),
139- "diff -c %s/expected/%s.out results/%s.out >> regression.diffs",
140- inputdir, testname, testname);
141+ "diff -c %s/expected/%s.out %s/results/%s.out >> regression.diffs",
142+ inputdir, testname, inputdir, testname);
143 if (system(cmdline) == -1)
144 printf("# diff failed\n");
145
146--
1472.8.2
148