| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | if [scip-shell system . . `[`. $(unamescip-shell system . . uname. -p) != "x86_64" ]; then |
| 4 | echoscip-shell system . . echo. "This test only runs on x86_64 host" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | unset SWTPM |
| 9 | |
| 10 | # Comment the following to compile and test with CUSE interface |
| 11 | WITHOUT_CUSE="--without-cuse" |
| 12 | |
| 13 | # FIXME: |
| 14 | # Due to some bug in glib2 for i686 we don't seem to be able to run a |
| 15 | # 32bit swtpm with cuse interface correctly. The g_cond_wait_until() |
| 16 | # doesn't behave as it does with 64bit. test_hashing2 gets stuck. |
| 17 | |
| 18 | |
| 19 | CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \ |
| 20 | make clean && \ |
| 21 | make -j$(nprocscip-shell system . . nproc.) && |
| 22 | sudoscip-shell system . . sudo. make -j$(nprocscip-shell system . . nproc.) install && |
| 23 | cpscip-shell system . . cp. /usr/bin/swtpmscip-shell filesystem . . `/usr/bin/swtpm`. /tmp/swtpm64scip-shell filesystem . . `/tmp/swtpm64`. && |
| 24 | makescip-shell system . . make. -j$(nprocscip-shell system . . nproc.) check || |
| 25 | exit 1 |
| 26 | if [scip-shell system . . `[`. -z "${WITHOUT_CUSE}" ]; then |
| 27 | sudoscip-shell system . . sudo. make -j$(nprocscip-shell system . . nproc.) check || |
| 28 | exit 1 |
| 29 | fi |
| 30 | |
| 31 | PKG_CONFIG_PATH=/usr/lib/pkgconfigscip-shell filesystem . . `/usr/lib/pkgconfig`. \ |
| 32 | CFLAGS='-m32' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib ${WITHOUT_CUSE} && \ |
| 33 | make clean && \ |
| 34 | make -j$(nprocscip-shell system . . nproc.) && |
| 35 | sudoscip-shell system . . sudo. make -j$(nprocscip-shell system . . nproc.) install && |
| 36 | cpscip-shell system . . cp. /usr/bin/swtpmscip-shell filesystem . . `/usr/bin/swtpm`. /tmp/swtpm32scip-shell filesystem . . `/tmp/swtpm32`. && |
| 37 | makescip-shell system . . make. -j$(nprocscip-shell system . . nproc.) check && |
| 38 | SWTPM_EXE=/tmp/swtpm64scip-shell filesystem . . `/tmp/swtpm64`. makescip-shell system . . make. -j$(nprocscip-shell system . . nproc.) check || |
| 39 | exit 1 |
| 40 | if [scip-shell system . . `[`. -z "${WITHOUT_CUSE}" ]; then |
| 41 | sudoscip-shell system . . sudo. SWTPM_EXE=/tmp/swtpm64scip-shell filesystem . . `/tmp/swtpm64`. make -j$(nprocscip-shell system . . nproc.) check || |
| 42 | exit 1 |
| 43 | fi |
| 44 | |
| 45 | CFLAGS='-m64' ./configure --with-openssl --with-gnutls --prefix=/usr --libdir=/lib64 ${WITHOUT_CUSE} && \ |
| 46 | make clean && \ |
| 47 | make -j$(nprocscip-shell system . . nproc.) && |
| 48 | SWTPM_EXE=/tmp/swtpm32scip-shell filesystem . . `/tmp/swtpm32`. makescip-shell system . . make. -j$(nprocscip-shell system . . nproc.) check || |
| 49 | exit 1 |
| 50 | |
| 51 | echoscip-shell system . . echo. "*** All tests succeeded ***" |
| 52 | |
| 53 | exit 0 |