diff options
author | Jakob Unterwurzacher | 2017-02-26 19:53:29 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-02-26 19:53:29 +0100 |
commit | d2c0fae4f657d01b692d04056f997c611b96299b (patch) | |
tree | ef6d1b93dd5002f4d55a821062a05026cf4d8943 | |
parent | 98ecf1f074400c7cdfa7d3eafb4eeb0ab12e9ebd (diff) |
tests: somewhat support testing without openssl
You will still get lots of test error, but at least the tests
will run.
-rwxr-xr-x | test-without-openssl.bash | 5 | ||||
-rw-r--r-- | tests/example_filesystems/example_filesystems_test.go | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/test-without-openssl.bash b/test-without-openssl.bash new file mode 100755 index 0000000..645c6cd --- /dev/null +++ b/test-without-openssl.bash @@ -0,0 +1,5 @@ +#!/bin/bash -eu + +cd "$(dirname "$0")" + +./test.bash -tags without_openssl diff --git a/tests/example_filesystems/example_filesystems_test.go b/tests/example_filesystems/example_filesystems_test.go index b14f14d..5192278 100644 --- a/tests/example_filesystems/example_filesystems_test.go +++ b/tests/example_filesystems/example_filesystems_test.go @@ -13,6 +13,7 @@ import ( "testing" "github.com/rfjakob/gocryptfs/internal/cryptocore" + "github.com/rfjakob/gocryptfs/internal/stupidgcm" "github.com/rfjakob/gocryptfs/tests/test_helpers" ) @@ -23,10 +24,16 @@ var opensslOpt string func TestMain(m *testing.M) { // Make "testing.Verbose()" return the correct value flag.Parse() - variants := []string{"-openssl=true", "-openssl=false"} - if !cryptocore.HaveModernGoGCM { - fmt.Printf("Skipping Go GCM variant, Go installation is too old") - variants = variants[:1] + var variants []string + if cryptocore.HaveModernGoGCM { + variants = append(variants, "-openssl=false") + } else { + fmt.Println("Skipping Go GCM tests, Go installation is too old") + } + if !stupidgcm.BuiltWithoutOpenssl { + variants = append(variants, "-openssl=true") + } else { + fmt.Println("Skipping OpenSSL tests, I have been compiled without openssl support") } for _, opensslOpt = range variants { if testing.Verbose() { |