aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2015-01-27 10:42:20 +0100
committerJerome Forissier <jerome.forissier@linaro.org>2015-01-27 11:22:29 +0100
commit999e4a6c0f64d3177fd3d0db234107b6fb860884 (patch)
treea9a503e954cca0034d0b5dcfd5ec9981061e31a1 /scripts
parent169695e9bb1a0289d07e3e88ccf6aa2a2df2d2ec (diff)
setup_qemu_optee.sh: add support for GlobalPlatform tests
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setup_qemu_optee.sh45
1 files changed, 39 insertions, 6 deletions
diff --git a/scripts/setup_qemu_optee.sh b/scripts/setup_qemu_optee.sh
index 3deaf199..f56b9234 100755
--- a/scripts/setup_qemu_optee.sh
+++ b/scripts/setup_qemu_optee.sh
@@ -6,6 +6,13 @@ DEV_PATH=$HOME/devel/qemu_optee
# You only need to set these variables if you have access to the OPTEE_TEST
# (requires a Linaro account and access to the git called optee_test.git)
+# If, in addition to the base OPTEE_TEST, you have access to the GlobalPlatform
+# "TEE Initial Configuration" test suite, you may add the tests by extracting
+# the test package in the current directory and run:
+# $ export CFG_GP_PACKAGE_PATH=<path to the test suite directory>
+# $ export CFG_GP_TESTSUITE_ENABLE=y
+# $ ./setup_qemu_optee.sh
+# $ ./build.sh
#LINARO_USERNAME=firstname.lastname # Should _NOT_ contain @linaro.org.
#HAVE_ACCESS_TO_OPTEE_TEST=1
@@ -28,9 +35,6 @@ DEV_PATH=$HOME/devel/qemu_optee
# 64-bit system without required 32-bit libs
# For Ubuntu 14.04 the following helps:
# sudo apt-get install libc6:i386 libstdc++6:i386 libz1:i386
-#
-# Complaints that cscope is missing can be fixed in Ubuntu 14.04 by:
-# sudo apt-get install cscope
################################################################################
# Don't touch anything below this comment #
@@ -68,7 +72,7 @@ STABLE_OPTEE_LK_COMMIT=f435628cbba777d7e46f46f9f813a1dd9206a68b
SRC_OPTEE_TEST=ssh://$LINARO_USERNAME@linaro-private.git.linaro.org/srv/linaro-private.git.linaro.org/swg/optee_test.git
DST_OPTEE_TEST=$DEV_PATH/optee_test
-STABLE_OPTEE_TEST_COMMIT=774cc3c10954eba316d56f48112652eff05f33a0
+STABLE_OPTEE_TEST_COMMIT=7f3746c396b61117dca0729577ce10b6a4be49ec
QEMU_PCSC_PASSTHRU_PATCHES=https://github.com/m943040028/qemu/releases/download/0.1/pcsc_patches.tbz2
@@ -379,6 +383,28 @@ file /lib/teetz/e6a33ed4-562b-463a-bb7eff5e15a493c8.ta $DEV_PATH/out/utest/user_
# OP-TEE Tests
file /bin/xtest $DEV_PATH/out/utest/host/xtest/bin/xtest 755 0 0
EOF
+
+if [ "$CFG_GP_TESTSUITE_ENABLE" = y ]; then
+cat >> $DST_GEN_ROOTFS/filelist-tee.txt << EOF
+
+# Additional TAs for GP tests
+file /lib/teetz/534d4152-5443-534c-4d4c54494e535443.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_TCF_MultipleInstanceTA/534d4152-5443-534c-4d4c54494e535443.ta 444 0 0
+file /lib/teetz/534d4152-542d-4353-4c542d54412d5354.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_testingClientAPI/534d4152-542d-4353-4c542d54412d5354.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-5444415441535431.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_DS/534d4152-5443-534c-5444415441535431.ta 444 0 0
+file /lib/teetz/534d4152-542d-4353-4c542d54412d5355.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_answerSuccessTo_OpenSession_Invoke/534d4152-542d-4353-4c542d54412d5355.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-5443525950544f31.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_Crypto/534d4152-5443-534c-5443525950544f31.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-5f54494d45415049.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_Time/534d4152-5443-534c-5f54494d45415049.ta 444 0 0
+file /lib/teetz/534d4152-5443-4c53-41524954484d4554.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_Arithmetical/534d4152-5443-4c53-41524954484d4554.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-544f53345041524d.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_check_OpenSession_with_4_parameters/534d4152-5443-534c-544f53345041524d.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-54455252544f4f53.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_answerErrorTo_OpenSession/534d4152-5443-534c-54455252544f4f53.ta 444 0 0
+file /lib/teetz/534d4152-542d-4353-4c542d54412d4552.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_answerErrorTo_Invoke/534d4152-542d-4353-4c542d54412d4552.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-53474c494e535443.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_TCF_SingleInstanceTA/534d4152-5443-534c-53474c494e535443.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-5441544346494341.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_TCF_ICA/534d4152-5443-534c-5441544346494341.ta 444 0 0
+file /lib/teetz/534d4152-5443-534c-5454434649434132.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_TCF_ICA2/534d4152-5443-534c-5454434649434132.ta 444 0 0
+file /lib/teetz/534d4152-542d-4353-4c542d54412d3031.ta $DEV_PATH/out/utest/user_ta/armv7/GP_TTA_TCF/534d4152-542d-4353-4c542d54412d3031.ta 444 0 0
+EOF
+fi
+
fi
if [ -n "$WITH_SE_API_TEST" ]; then
@@ -439,6 +465,13 @@ export CFG_DEV_PATH=$DEV_PATH
export CFG_PLATFORM_FLAVOR=qemu_virt
export CFG_ROOTFS_DIR=\$CFG_DEV_PATH/out
+if [ "\$CFG_GP_TESTSUITE_ENABLE" = y ]; then
+export CFG_GP_PACKAGE_PATH=\${CFG_GP_PACKAGE_PATH:-$DST_OPTEE_TEST/TEE_Initial_Configuration-Test_Suite_v1_0_0-2014-12-03-STM}
+if [ ! -d "\$CFG_GP_PACKAGE_PATH" ]; then
+ echo "CFG_GP_PACKAGE_PATH must be the path to the GP testsuite directory"
+ exit 1
+fi
+fi
make -j\`getconf _NPROCESSORS_ONLN\` $@
EOF
@@ -484,7 +517,7 @@ cat > $DEV_PATH/build.sh << EOF
#!/bin/bash
set -e
cd $DEV_PATH
-./build_optee_os.sh all cscope
+./build_optee_os.sh all
./build_optee_client.sh
if [ -f "build_optee_tests.sh" ]; then
./build_optee_tests.sh
@@ -494,7 +527,7 @@ if [ -f "build_se_api_test.sh" ]; then
fi
./build_optee_linuxkernel.sh
./update_rootfs.sh
-./build_bios.sh cscope all
+./build_bios.sh all
EOF
chmod 711 $DEV_PATH/build.sh