Skip to content

Commit

Permalink
Fix unbound variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Nov 22, 2019
1 parent 69bff31 commit aba8c1f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ main() {
export QEMU_STRACE=1

# test `cross check`
if [ ! -z $STD ]; then
if [[ ! -z ${STD:-} ]]; then
td=$(mktemp -d)
cargo init --lib --name foo $td
pushd $td
Expand All @@ -53,7 +53,7 @@ main() {
fi

# `cross build` test for targets where `std` is not available
if [ -z "$STD" ]; then
if [[ -z "${STD:-}" ]]; then
td=$(mktemp -d)

git clone \
Expand Down Expand Up @@ -99,9 +99,9 @@ EOF
rm -rf $td
fi

if [ $RUN ]; then
if [[ ${RUN:-} ]]; then
# `cross test` test
if [ $DYLIB ]; then
if [[ ${DYLIB:-} ]]; then
td=$(mktemp -d)

pushd $td
Expand Down Expand Up @@ -151,15 +151,15 @@ EOF
fi

# Test C++ support
if [ $CPP ]; then
if [[ ${CPP:-} ]]; then
td=$(mktemp -d)

git clone --depth 1 https://github.com/japaric/hellopp $td

pushd $td
cargo update -p gcc
retry cargo fetch
if [ $RUN ]; then
if [[ ${RUN:-} ]]; then
cross_run --target $TARGET
else
cross build --target $TARGET
Expand All @@ -171,7 +171,7 @@ EOF
}

cross_run() {
if [ -z "$RUNNERS" ]; then
if [[ -z "${RUNNERS:-}" ]]; then
cross run "$@"
else
for runner in $RUNNERS; do
Expand All @@ -182,7 +182,7 @@ cross_run() {
}

cross_test() {
if [ -z "$RUNNERS" ]; then
if [[ -z "${RUNNERS:-}" ]]; then
cross test "$@"
else
for runner in $RUNNERS; do
Expand All @@ -193,7 +193,7 @@ cross_test() {
}

cross_bench() {
if [ -z "$RUNNERS" ]; then
if [[ -z "${RUNNERS:-}" ]]; then
cross bench "$@"
else
for runner in $RUNNERS; do
Expand Down
2 changes: 2 additions & 0 deletions docker/android-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ EOF
# FATAL: kernel did not supply AT_SECURE
sed -i -e 's/if (!kernel_supplied_AT_SECURE)/if (false)/g' bionic/linker/linker_environ.cpp

set +u
source build/envsetup.sh
lunch aosp_$arch-user
mmma bionic/
mmma external/mksh/
mmma system/core/toolbox/
set -u

if [ $arch = "arm" ]; then
mv out/target/product/generic/system/ /
Expand Down
3 changes: 3 additions & 0 deletions docker/linux-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ main() {

local dropbear="dropbear-bin"

local deps=
local kernel=

# select debian arch and kernel version
case $arch in
aarch64)
Expand Down

0 comments on commit aba8c1f

Please sign in to comment.