#!./common/bats/bin/bats 
# -*-sh-*-

source ./common/test_helper_functions.bash || exit 1
source ./common/functions || exit 1

if [ -s ./common/TEST_ENV ];then
    source ./common/TEST_ENV
fi

check_rms
rm=$RESOURCE_MANAGER

PKG="Boost/Random"

@test "[$PKG] test_piecewise_linear under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    test=test_piecewise_linear
    if [ ! -x $test ];then
        flunk "$test does not exist"
    fi
    run_serial_binary ./$test
    assert_success
}

@test "[$PKG] test_discrete under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    test=test_discrete
    if [ ! -x $test ];then
        flunk "$test does not exist"
    fi
    run_serial_binary ./$test
    assert_success
}

@test "[$PKG] test_random_device under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    test=test_random_device
    if [ ! -x $test ];then
        flunk "$test does not exist"
    fi
    run_serial_binary ./$test
    assert_success
}

@test "[$PKG] test_random_number_generator under resource manager ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    test=test_random_number_generator
    if [ ! -x $test ];then
        flunk "$test does not exist"
    fi
    run_serial_binary ./$test
    assert_success
}

