xref: /aosp_15_r20/external/libcxx/ndk-test.sh (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1*58b9f456SAndroid Build Coastguard Worker#!/bin/bash
2*58b9f456SAndroid Build Coastguard Worker
3*58b9f456SAndroid Build Coastguard Worker# This file should reside in test/, but it seems that if there is already one
4*58b9f456SAndroid Build Coastguard Worker# lit.site.cfg in the test/ directory it is impossible to tell LIT to use
5*58b9f456SAndroid Build Coastguard Worker# another. This will need to be fixed upstream before this can get a proper
6*58b9f456SAndroid Build Coastguard Worker# home. The downside of this is that there isn't a way to run a subset of the
7*58b9f456SAndroid Build Coastguard Worker# libc++ tests against the NDK.
8*58b9f456SAndroid Build Coastguard Workerif [ -z "$ANDROID_PRODUCT_OUT" ]; then
9*58b9f456SAndroid Build Coastguard Worker  >&2 echo "Error: ANDROID_PRODUCT_OUT is not set. Have you run lunch?"
10*58b9f456SAndroid Build Coastguard Worker  exit 1
11*58b9f456SAndroid Build Coastguard Workerfi
12*58b9f456SAndroid Build Coastguard Worker
13*58b9f456SAndroid Build Coastguard Workerif [ ! -f $ANDROID_PRODUCT_OUT/system/lib/libc++_ndk.so ]; then
14*58b9f456SAndroid Build Coastguard Worker  >&2 echo "Error: libc++_ndk.so has not been built for this target."
15*58b9f456SAndroid Build Coastguard Worker  exit 1
16*58b9f456SAndroid Build Coastguard Workerfi
17*58b9f456SAndroid Build Coastguard Worker
18*58b9f456SAndroid Build Coastguard Workeradb push $ANDROID_PRODUCT_OUT/system/lib/libc++_ndk.so /data/local/tmp
19*58b9f456SAndroid Build Coastguard Workerlit -sv $* .
20