Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[develop] Ensure we're in repo root #7486

Merged
merged 5 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/eosio_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ if [ $# -ne 0 ]; then
done
fi

# Ensure we're in the repo root and not inside of scripts
cd $( dirname "${BASH_SOURCE[0]}" )/..

# Load eosio specific helper functions
. ./scripts/helpers/eosio.sh

Expand Down
5 changes: 3 additions & 2 deletions tests/bash-bats/eosio_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ TEST_LABEL="[eosio_build]"
[[ ! -z $(echo "${output}" | grep "Unable to find compiler") ]] || exit
fi

# -P with -y
run bash -c "./$SCRIPT_LOCATION -y -P"
cd .. # Also test that we can run the script from a directory other than the root
run bash -c "./eos/$SCRIPT_LOCATION -y -P"
[[ ! -z $(echo "${output}" | grep "PIN_COMPILER: true") ]] || exit
[[ "${output}" =~ -DCMAKE_TOOLCHAIN_FILE=\'.*/scripts/../build/pinned_toolchain.cmake\' ]] || exit
[[ "${output}" =~ "Clang 8 successfully installed" ]] || exit
cd eos
# -P with prompts
run bash -c "printf \"n\nn\nn\n\" | ./$SCRIPT_LOCATION -P"
[[ "${output}" =~ .*User.aborted.* ]] || exit
Expand Down