mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-29 16:17:32 +00:00
new(test): run_regression_tests.sh -h
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
parent
e618f005b6
commit
a83b91fc53
@ -107,11 +107,15 @@ OPT_ONLY_PREPARE="false"
|
||||
OPT_VERBOSE="false"
|
||||
OPT_BUILD_DIR="$(dirname "$SCRIPTDIR")/build"
|
||||
OPT_BRANCH="none"
|
||||
while getopts ':p :v :b: :d:' 'OPTKEY'; do
|
||||
while getopts ':p :h :v :b: :d:' 'OPTKEY'; do
|
||||
case ${OPTKEY} in
|
||||
'p')
|
||||
OPT_ONLY_PREPARE="true"
|
||||
;;
|
||||
'h')
|
||||
/bin/bash usage
|
||||
exit 0
|
||||
;;
|
||||
'v')
|
||||
OPT_VERBOSE="true"
|
||||
;;
|
||||
@ -122,15 +126,18 @@ while getopts ':p :v :b: :d:' 'OPTKEY'; do
|
||||
OPT_BRANCH=${OPTARG}
|
||||
;;
|
||||
'?')
|
||||
echo "Invalid option -- ${OPTARG}" >&2
|
||||
echo "Invalid option: ${OPTARG}." >&2
|
||||
/bin/bash usage
|
||||
exit 1
|
||||
;;
|
||||
':')
|
||||
echo "Missing argument for option -- ${OPTARG}" >&2
|
||||
echo "Missing argument for option: ${OPTARG}." >&2
|
||||
/bin/bash usage
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "Unimplemented option -- ${OPTKEY}" >&2
|
||||
echo "Unimplemented option: ${OPTKEY}." >&2
|
||||
/bin/bash usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -140,7 +147,7 @@ TRACE_DIR=$OPT_BUILD_DIR/test
|
||||
|
||||
if ${OPT_VERBOSE}; then
|
||||
echo "Build directory = $OPT_BUILD_DIR"
|
||||
echo "Trace directory = $TRACE_DIR (creating...)"
|
||||
echo "Trace directory = $TRACE_DIR"
|
||||
echo "Custom branch = $OPT_BRANCH"
|
||||
fi
|
||||
|
||||
|
32
test/usage
Executable file
32
test/usage
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2020 The Falco Authors.
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
cat <<EOF
|
||||
Hello, this is Falco integration tests runner.
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
bash run_regression_tests.sh [-h] [-v] [-p] [-d=<build directory>] [-b=<custom branch>]
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
-h Display usage instructions
|
||||
-v Verbose output
|
||||
-p Prepare the falco_traces integration test suite
|
||||
-b=CUSTOM_BRANCH Specify a custom branch for downloading falco_traces fixtures (defaults to "none")
|
||||
-d=BUILD_DIRECTORY Specify the build directory where Falco has been built (defaults to $SCRIPTDIR/../build)
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user