...

Text file src/edge-infra.dev/pkg/edge/logging/fluentbit/run_lua_tests.sh

Documentation: edge-infra.dev/pkg/edge/logging/fluentbit

     1#!/usr/bin/env bash
     2
     3# accepts 3 parameters:
     4#  1. the path to the lua binary
     5#  2. the path to where _test.lua files reside
     6#  3. the path to the lua unit test library
     7#
     8# bazel test //pkg/edge/logging/fluentbit:lua_test
     9# BUILD.bazel contains the argument list passed to this script.
    10
    11set -o errexit
    12set -o nounset
    13set -o pipefail
    14
    15lua="$1"
    16
    17# we need the absolute paths for the target direcotry and testing library
    18# so we can pass it to lua's package path variable. 
    19target_dir="$2"
    20test_library="$3"
    21
    22test_scripts="$target_dir/*_test.lua"
    23for lua_script in $test_scripts
    24do 
    25  $lua "$lua_script" "$test_library" "$target_dir"
    26done
    27

View as plain text