File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,7 @@ def generate_command(
342342 options : Dict [str , Option ],
343343 help : str ,
344344 precheck : Optional [Callable [[], None ]] = None ,
345+ post_build : Optional [List [str ]] = None ,
345346):
346347 """
347348 Helper to generate CLIs that:
@@ -378,6 +379,9 @@ def fn(
378379 f"./tests/scripts/task_build.py --build-dir { get_build_dir (name )} " ,
379380 ]
380381
382+ if post_build is not None :
383+ scripts += post_build
384+
381385 # Check that a test suite was not used alongside specific test names
382386 if any (v for v in kwargs .values ()) and tests is not None :
383387 option_flags = ", " .join ([f"--{ k } " for k in options .keys ()])
@@ -624,12 +628,12 @@ def add_subparser(
624628 generate_command (
625629 name = "hexagon" ,
626630 help = "Run Hexagon build and test(s)" ,
631+ post_build = ["./tests/scripts/task_build_hexagon_api.sh --output build-hexagon" ],
627632 options = {
628633 "cpp" : CPP_UNITTEST ,
629634 "test" : (
630635 "run Hexagon API/Python tests" ,
631636 [
632- "./tests/scripts/task_build_hexagon_api.sh" ,
633637 "./tests/scripts/task_python_hexagon.sh" ,
634638 ],
635639 ),
Original file line number Diff line number Diff line change 1919set -e
2020set -u
2121
22+ output_directory_parent=$( realpath ${PWD} /build)
23+ if [ $# -ge 1 ] && [[ " $1 " == " --output" ]]; then
24+ shift 1
25+ output_directory_parent=$( realpath $1 )
26+ shift 1
27+ fi
28+ output_directory=" ${output_directory_parent} /hexagon_api_output"
29+ rm -rf ${output_directory}
30+
2231use_cache=false
2332if [ $# -ge 1 ] && [[ " $1 " == " --use-cache" ]]; then
2433 use_cache=true
2534 shift 1
2635fi
2736
2837cd apps/hexagon_api
29-
3038if [ " $use_cache " = false ]; then
3139 rm -rf build
3240fi
33-
3441mkdir -p build
3542cd build
3643
37- output_binary_directory=$( realpath ${PWD} /../../../build/hexagon_api_output)
38- rm -rf ${output_binary_directory}
39-
4044cmake -DANDROID_ABI=arm64-v8a \
4145 -DANDROID_PLATFORM=android-28 \
4246 -DUSE_ANDROID_TOOLCHAIN=" ${ANDROID_NDK_HOME} /build/cmake/android.toolchain.cmake" \
4347 -DUSE_HEXAGON_ARCH=v68 \
4448 -DUSE_HEXAGON_SDK=" ${HEXAGON_SDK_ROOT} " \
4549 -DUSE_HEXAGON_TOOLCHAIN=" ${HEXAGON_TOOLCHAIN} " \
46- -DUSE_OUTPUT_BINARY_DIR=" ${output_binary_directory } " \
50+ -DUSE_OUTPUT_BINARY_DIR=" ${output_directory } " \
4751 -DUSE_HEXAGON_GTEST=" ${HEXAGON_SDK_ROOT} /utils/googletest/gtest" ..
4852
4953make -j$( nproc)
You can’t perform that action at this time.
0 commit comments