Commits

ysulsky  committed 3caf1d5

declare tests flag only for older versions of oasis

  • Participants
  • Parent commits 7029f75

Comments (0)

Files changed (5)

File base/bin-prot/oasis.sh

   XMETARequires:      type-conv
   XMETADescription:   Syntax extension for binary protocol generator
 
-#Flag tests
-#  Description:        Build and run tests
-#  Default:            false
+$(declare_tests_flag)
 
 Executable test_runner
   Path:               lib_test

File base/core/extended/oasis.sh

                       unix,
                       threads
 
-#Flag tests
-#  Description:        Build and run tests
-#  Default:            false
+$(declare_tests_flag)
 
 Executable core_extended_hello
   Path:               lib_test

File base/core/oasis.sh

                       unix,
                       threads
 
-#Flag tests
-#  Description:        Build and run tests
-#  Default:            false
+$(declare_tests_flag)
 
 Executable test_runner
   Path:               lib_test

File base/sexplib/oasis.sh

 #  FindlibName:        top
 
 # TODO: figure out how to build tests without installing sexplib
-#Flag tests
-#  Description:        Build and run tests
-#  Default:            false
+$(declare_tests_flag)
 
 Executable sexp_test
   Path:               lib_test

File build-common.sh

     done
 }
 
+function declare_tests_flag {
+  # prior to oasis version 0.3.0, the "tests" flag is not built in
+  # and, the "version" argument is not supported.
+  if ! oasis version 2>/dev/null >/dev/null; then
+    cat <<EOF
+Flag tests
+  Description: Build and run tests
+  Default:     false
+EOF
+  fi
+}
+
 HERE=$(dirname "$0")