jenkins: run more tests on windows
authorJustus Winter <justus@g10code.com>
Thu, 26 Jan 2017 09:49:08 +0000 (10:49 +0100)
committerJustus Winter <justus@g10code.com>
Thu, 26 Jan 2017 09:49:35 +0000 (10:49 +0100)
misc/jenkins/README.org
misc/jenkins/bin/make-windows-cd.sh
misc/jenkins/bin/run-tests-w32.bash
misc/jenkins/bin/run-tests.bat

index 4862601..5d0e8ef 100644 (file)
@@ -9,6 +9,10 @@ and a build tree at
 
   $HOME/src/gpgme-for-gnupgs-tests/obj
 
+and a w32 build tree at
+
+  $HOME/src/gpgme-for-gnupgs-tests/obj.w32
+
 The tests from there are executed in GnuPG's test suite.
 * Virtual machines
 ** openbsd60
index a66c38a..835f798 100644 (file)
@@ -9,6 +9,8 @@ fi
 [ -z "$w32root" ] && w32root="$HOME/w32root"
 ADDITIONAL_FILES=
 IMAGE=gnupg-test.iso
+XTEST_GPGME_SRCDIR=$HOME/src/gpgme-for-gnupgs-tests
+XTEST_GPGME_BUILDDIR=$HOME/src/gpgme-for-gnupgs-tests/obj.w32
 
 [ -f make-windows-cd.rc ] && . make-windows-cd.rc
 
@@ -27,7 +29,18 @@ cp -v tests/gpgscm/*.exe $TARGET
 cp -v tools/mk-tdata.exe $TARGET || true
 cp -v agent/gpg-preset-passphrase.exe $TARGET
 cp -v -a ../tests $TARGET
+if [ -e "$XTEST_GPGME_SRCDIR" ] && [ -e "$XTEST_GPGME_BUILDDIR" ]; then
+    cp -a "$XTEST_GPGME_SRCDIR" $TARGET/gpgme
+    cp -v "$XTEST_GPGME_BUILDDIR"/src/.libs/*.exe $TARGET
+    cp -v "$XTEST_GPGME_BUILDDIR"/src/.libs/*.dll $TARGET
+    # Strip .git.
+    rm -rf -- $TARGET/gpgme/.git
+    # Remove native build if it exists.
+    rm -rf -- $TARGET/gpgme/obj
+fi
+cp -v -a ../tests $TARGET
 cp -v tests/openpgp/fake-pinentry.exe $TARGET
 cp -v /home/jenkins/bin/run-tests.bat $WORKDIR
+[ -f "$IMAGE" ] && rm -f "$IMAGE"
 genisoimage --output "$IMAGE" -J "$WORKDIR"
 [ "${WORKDIR}" ] && rm -rf -- "${WORKDIR}"
index 44e303d..799f7fa 100755 (executable)
@@ -40,7 +40,7 @@ function vwait() {
 }
 
 # Revert to current snapshot and start the machine.
-vdo snapshot-revert --current --force --running "$GUEST"
+vdo snapshot-revert --snapshotname tests --force --running "$GUEST"
 
 # Insert the CD.
 vdo change-media --update "$GUEST" "$GUEST_CDROM" "$1"
@@ -53,13 +53,13 @@ set -x
 
 if [ "$2" ]; then
     scp "$2" "$SSH:"
-    sleep 1 # XXX: openssh on windows is a bit fragile...
+    sleep 5 # XXX: openssh on windows is a bit fragile...
     time vssh "cmd /c $(basename $2)"
 else
     time vssh "cmd /c d:/run-tests.bat"
 fi
 
-sleep 1 # XXX: openssh on windows is a bit fragile...
+sleep 5 # XXX: openssh on windows is a bit fragile...
 
 # The scp server is a bit fragile as well, and I believe globbing does
 # not work.  Simply use gpgtar.
index adef960..996809f 100644 (file)
@@ -1,21 +1,46 @@
 @echo off
 
 set BIN_PREFIX=d:\gnupg
+set PATH=%BIN_PREFIX%;%PATH%
 set GPGSCM_PATH=%BIN_PREFIX%/tests/gpgscm;%BIN_PREFIX%/tests/openpgp
 set EXEEXT=.exe
-set srcdir=%BIN_PREFIX%/tests/openpgp
 set TMP=c:\temp
 set WD=c:\temp\logs
 mkdir %TMP%
 mkdir %WD%
 
 cd /d %BIN_PREFIX%
+echo Running self tests...
 %BIN_PREFIX%\gpgscm.exe --verbose tests/gpgscm/t-child.scm
 
-cd /d %WD%
-
 rem the gpgtar.scm is acting up (looping), and we don't deal with that
 rem well atm, so we simply omit it
 
-echo Running tests...
-%BIN_PREFIX%\gpgscm.exe %srcdir%/run-tests.scm --parallel version.scm enarmor.scm mds.scm decrypt.scm decrypt-multifile.scm decrypt-dsa.scm decrypt-session-key.scm sigs.scm sigs-dsa.scm encrypt.scm encrypt-multifile.scm encrypt-dsa.scm compression.scm seat.scm clearsig.scm encryptp.scm detach.scm detachm.scm armsigs.scm armencrypt.scm armencryptp.scm signencrypt.scm signencrypt-dsa.scm armsignencrypt.scm armdetach.scm armdetachm.scm genkey1024.scm conventional.scm conventional-mdc.scm multisig.scm verify.scm verify-multifile.scm gpgv-forged-keyring.scm armor.scm import.scm import-revocation-certificate.scm ecc.scm 4gb-packet.scm tofu.scm use-exact-key.scm default-key.scm export.scm ssh-import.scm ssh-export.scm quick-key-manipulation.scm key-selection.scm delete-keys.scm gpgconf.scm issue2015.scm issue2346.scm issue2417.scm issue2419.scm
+echo Running OpenPGP tests...
+cd /d %WD%
+mkdir openpgp
+cd openpgp
+
+set srcdir=%BIN_PREFIX%/tests/openpgp
+%BIN_PREFIX%\gpgscm.exe %srcdir%/run-tests.scm --parallel version.scm enarmor.scm mds.scm decrypt.scm decrypt-multifile.scm decrypt-dsa.scm decrypt-session-key.scm sigs.scm sigs-dsa.scm encrypt.scm encrypt-multifile.scm encrypt-dsa.scm compression.scm seat.scm clearsig.scm encryptp.scm detach.scm detachm.scm armsigs.scm armencrypt.scm armencryptp.scm signencrypt.scm signencrypt-dsa.scm armsignencrypt.scm armdetach.scm armdetachm.scm genkey1024.scm conventional.scm conventional-mdc.scm multisig.scm verify.scm verify-multifile.scm gpgv-forged-keyring.scm armor.scm import.scm import-revocation-certificate.scm ecc.scm 4gb-packet.scm tofu.scm use-exact-key.scm default-key.scm export.scm ssh-import.scm ssh-export.scm quick-key-manipulation.scm key-selection.scm delete-keys.scm gpgconf.scm issue2015.scm issue2346.scm issue2417.scm issue2419.scm issue2929.scm
+
+echo Running gpgsm tests...
+cd /d %WD%
+mkdir gpgsm
+cd gpgsm
+
+set GPGSCM_PATH=%BIN_PREFIX%/tests/gpgscm;%BIN_PREFIX%/tests/openpgp;%BIN_PREFIX%/tests/gpgsm
+set srcdir=%BIN_PREFIX%/tests/gpgsm
+%BIN_PREFIX%\gpgscm.exe %srcdir%/run-tests.scm --parallel import.scm encrypt.scm verify.scm decrypt.scm sign.scm export.scm
+
+echo Running GPGME tests...
+cd /d %WD%
+mkdir gpgme
+cd gpgme
+
+rem set verbose=3
+set GPGSCM_PATH=%BIN_PREFIX%/tests/gpgscm;%BIN_PREFIX%/tests/openpgp;%BIN_PREFIX%/tests/gpgme
+set srcdir=%BIN_PREFIX%/tests/gpgme
+set XTEST_GPGME_SRCDIR=%BIN_PREFIX%/gpgme
+set XTEST_GPGME_BUILDDIR=%BIN_PREFIX%/gpgme/obj.w32
+%BIN_PREFIX%\gpgscm.exe %srcdir%/run-tests.scm --parallel