Mercurial > hg > monetdb-perl
annotate runtests.sh @ 41:5b27d21cf817
comment in test script
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Thu, 17 Dec 2020 14:28:06 +0100 (2020-12-17) |
parents | c436b5131196 |
children | b35ed8684036 |
rev | line source |
---|---|
29
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
1 #!/bin/bash |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
2 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
3 DBPATH="$PWD"/DB |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
4 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
5 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
6 set -e -x |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
7 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
8 # Start the mserver |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
9 rm -rf "$DBPATH" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
10 mkdir "$DBPATH" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
11 mserver5 --dbpath="$DBPATH/perltestdb" >"$DBPATH/mserver5.log" 2>&1 & |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
12 pid=$! |
41
5b27d21cf817
comment in test script
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
37
diff
changeset
|
13 # Make sure to kill it when the script ends |
29
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
14 trap "kill -9 $pid 2>/dev/null" EXIT |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
15 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
16 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
17 # After a few seconds, check if it's still running |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
18 sleep 3 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
19 if ! kill -0 $pid 2>/dev/null; then |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
20 echo "MSERVER STOPPED EARLY" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
21 cat "$DBPATH/mserver5.log" |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
22 exit 1 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
23 fi |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
24 |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
25 export DBI_DSN=dbi:monetdb:database=perltestdb |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
26 export PERL5LIB=$PWD/MonetDB-CLI-MapiPP:$PWD/MonetDB-CLI:$PWD |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
27 |
37
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
28 |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
29 for i in DBD MonetDB-CLI/MonetDB MonetDB-CLI-MapiPP/MonetDB/CLI |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
30 do |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
31 ( |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
32 cd $i |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
33 perl Makefile.PL |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
34 make |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
35 ) |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
36 done |
c436b5131196
Also run the tests
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
29
diff
changeset
|
37 |
29
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
38 make -C DBD test |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
39 : |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
40 make -C MonetDB-CLI/MonetDB test |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
41 : |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
42 make -C MonetDB-CLI-MapiPP/MonetDB/CLI test |
a8bdee6b0128
Add two shell scripts for use in GitHub workflow
Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
parents:
diff
changeset
|
43 : |