ysulsky avatar ysulsky committed 3caf1d5

declare tests flag only for older versions of oasis

Comments (0)

Files changed (5)

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

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

base/core/oasis.sh

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

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
     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")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.