Skip to content

Commit

Permalink
tests: Make the script modular
Browse files Browse the repository at this point in the history
Issue: [1]

[1]: #22

Signed-off-by: Saalim Quadri <[email protected]>
  • Loading branch information
danascape committed Oct 8, 2023
1 parent 921f36a commit 57a2f41
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions tests/compile_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,25 @@
# SPDX-License-Identifier: Apache-2.0 license
#

mkdir tc
export TC_DIR="$PWD/tc"
export WORK_DIR="$PWD"
clone_kernel()
{
git clone --depth 1 -b master https://github.com/stormbreaker-project/linux-asus-x00p-3.18 X00P
}

git clone --depth 1 -b master https://github.com/stormbreaker-project/linux-asus-x00p-3.18 X00P
git clone --depth=1 https://github.com/stormbreaker-project/aarch64-linux-android-4.9 "$TC_DIR"/gcc > /dev/null 2>&1
git clone --depth=1 https://github.com/stormbreaker-project/arm-linux-androideabi-4.9 "$TC_DIR"/gcc_32 > /dev/null 2>&1
git clone --depth=1 -b aosp-11.0.5 https://github.com/sohamxda7/llvm-stable "$TC_DIR"/clang > /dev/null 2>&1
export PATH="$PWD/tc/clang/bin:$PWD/tc/gcc/bin:$PWD/tc/gcc_32/bin:${PATH}"
cd X00P || exit 1
"$WORK_DIR"/sw b X00P-3.18
clone_toolchains()
{
git clone --depth=1 https://github.com/stormbreaker-project/aarch64-linux-android-4.9 "$TC_DIR"/gcc > /dev/null 2>&1
git clone --depth=1 https://github.com/stormbreaker-project/arm-linux-androideabi-4.9 "$TC_DIR"/gcc_32 > /dev/null 2>&1
git clone --depth=1 -b aosp-11.0.5 https://github.com/sohamxda7/llvm-stable "$TC_DIR"/clang > /dev/null 2>&1
}

compile_kernel()
{
export PATH="$PWD/tc/clang/bin:$PWD/tc/gcc/bin:$PWD/tc/gcc_32/bin:${PATH}"
cd X00P || exit 1
"$WORK_DIR"/sw b X00P-3.18
}

clone_kernel
clone_toolchains
compile_kernel

0 comments on commit 57a2f41

Please sign in to comment.