Limit scripts in path for tests

shellspec adds spec/support/bin to the path, so we can put scripts that
should always be available here.

Also don't source sxmo_common.sh in the helper, if scripts don't do it
themselves we shouldn't do it for them in the tests.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
This commit is contained in:
ArenM
2022-06-11 20:31:07 -04:00
committed by Anjandev Momi
parent 69fb14a291
commit 7e763717d4
5 changed files with 2 additions and 8 deletions

View File

@@ -1,6 +1,3 @@
# shellcheck disable=SC2155
export PATH="$PATH:$(pwd)/scripts/core"
# This file is to investigate whether sxmo_common.sh is loaded in tests
Describe 'sxmo_common.sh'

View File

@@ -1,4 +1,3 @@
# shellcheck disable=SC2155
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors
export PATH="$PATH:$(pwd)/scripts/core:$(pwd)/configs/default_hooks"

View File

@@ -7,10 +7,6 @@
# so it is better to set them here.
# set -eu
# Include common aliases such as find='busybox find' to avoid breaking
# expected coreutils environment.
. scripts/core/sxmo_common.sh
# This callback function will be invoked only once before loading specfiles.
spec_helper_precheck() {
# Available functions: info, warn, error, abort, setenv, unsetenv

View File

@@ -0,0 +1 @@
../../../scripts/core/sxmo_common.sh

View File

@@ -0,0 +1 @@
../../../configs/default_hooks/sxmo_hook_icons.sh