summaryrefslogtreecommitdiffstats
path: root/src/test/framework
diff options
context:
space:
mode:
authorSunil Kumar <skumar8j@in.ibm.com>2018-11-15 00:20:34 -0600
committerRAJA DAS <rajadas2@in.ibm.com>2019-05-30 05:41:21 -0500
commit01030a212c0793d0f8c84c8ff187fe7db0e07df7 (patch)
tree5a639dc63b6c7cd5a372b0856e8be02724bdc221 /src/test/framework
parent28c54880dd080a0baa1540246effd7c49a499c82 (diff)
downloadtalos-sbe-01030a212c0793d0f8c84c8ff187fe7db0e07df7.tar.gz
talos-sbe-01030a212c0793d0f8c84c8ff187fe7db0e07df7.zip
AXONE Bringup CI
Change-Id: I611879498fe0b728547209716cecf6d940a9a820 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72837 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Diffstat (limited to 'src/test/framework')
-rwxr-xr-xsrc/test/framework/autocitest11
-rwxr-xr-xsrc/test/framework/build-script56
-rwxr-xr-xsrc/test/framework/create-sandbox36
-rwxr-xr-xsrc/test/framework/populate-sandbox37
-rwxr-xr-xsrc/test/framework/setup-env5
5 files changed, 98 insertions, 47 deletions
diff --git a/src/test/framework/autocitest b/src/test/framework/autocitest
index a57486b8..7930b5f9 100755
--- a/src/test/framework/autocitest
+++ b/src/test/framework/autocitest
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
@@ -91,7 +91,14 @@ then
fi
fi
-execute_in_sandbox "run-fsp-it $NOWIN --machine $MACHINE $SBE_TEST_XML" "ppc" || exit -1
+if [ "$MACHINE_TYPE" = "NIMBUS" ]; then
+ execute_in_sandbox "run-fsp-it $NOWIN --machine $MACHINE_TYPE $SBE_TEST_XML" "ppc" || exit -1
+elif [ "$MACHINE_TYPE" = "AXONE" ]; then
+ curDir=`pwd`
+ cd $SANDBOXBASE/simics/
+ ./runsim -m axone sbe_script_to_run=$SBETESTDIRAXONE/sbe_startupAxone.simics sbe_scripts_path=$SBETESTDIRAXONE sbe_ci=TRUE sbe_ci_script=$SBETESTDIRAXONE/testAxone.simics || exit -1
+ cd $curDir
+fi
exit 0
diff --git a/src/test/framework/build-script b/src/test/framework/build-script
index 35c4d5fa..579a8364 100755
--- a/src/test/framework/build-script
+++ b/src/test/framework/build-script
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2018
+# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
@@ -41,32 +41,38 @@ source "$SBEROOT/src/test/framework/setup-env"
# Build SEEPROM Image
bash -c "make install -j" || exit -1
-# Create simics sandbox.
-create-sandbox > create-sandbox.log 2>&1 &
-CREATESANDBOX_PID=$!
+while read -d ':' p; do
-# Check sandbox create completion.
-wait $CREATESANDBOX_PID
-if [ $? -eq 0 ]; then
- cat create-sandbox.log
-else
- echo "----Sandbox creation failed."
- cat create-sandbox.log
- exit -1
-fi
+ export MACHINE_TYPE="$p"
+ echo "Setting up test simics for machine: '$MACHINE_TYPE'"
+
+ # Create simics sandbox.
+ create-sandbox > create-sandbox.log 2>&1 &
+ CREATESANDBOX_PID=$!
+
+ # Check sandbox create completion.
+ wait $CREATESANDBOX_PID
+ if [ $? -eq 0 ]; then
+ cat create-sandbox.log
+ else
+ echo "----Sandbox creation failed."
+ cat create-sandbox.log
+ exit -1
+ fi
-# Add SBE files to simics sandbox.
-populate-sandbox || exit -1
+ # Add SBE files to simics sandbox.
+ populate-sandbox || exit -1
-sbetest-start.sh || exit -1
+ sbetest-start.sh || exit -1
-# Check copyright completion.
-#wait $COPYRIGHT_PID
-#if [ $? -eq 0 ]; then
-# cat copyright.log
-#else
-# echo "----Copyright check failed."
-# cat copyright.log
-# exit -1
-#fi
+ # Check copyright completion.
+ #wait $COPYRIGHT_PID
+ #if [ $? -eq 0 ]; then
+ # cat copyright.log
+ #else
+ # echo "----Copyright check failed."
+ # cat copyright.log
+ # exit -1
+ #fi
+done <<< "$MACHINE:"
diff --git a/src/test/framework/create-sandbox b/src/test/framework/create-sandbox
index 0ddf74a5..78caa74c 100755
--- a/src/test/framework/create-sandbox
+++ b/src/test/framework/create-sandbox
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2017
+# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
@@ -53,22 +53,24 @@ export sb=$SANDBOXBASE/src
execute_in_sandbox "ecc --inject ${SBE_IMG_OUT_LOC}/sbe_seeprom.bin --output ${SBE_IMG_OUT_LOC}/sbe_seeprom.bin.ecc --p8 " "ppc" || exit -1
-# Run presimsetup workarounds.
-echo "----Running presimsetup workarounds."
-if [ -f ${CITESTPATH}/etc/workarounds.presimsetup ];
-then
- ${CITESTPATH}/etc/workarounds.presimsetup || exit -1
-fi
+echo $MACHINE_TYPE
+if [ "$MACHINE_TYPE" = "NIMBUS" ]; then
+ # Run presimsetup workarounds.
+ echo "----Running presimsetup workarounds."
+ if [ -f ${CITESTPATH}/etc/workarounds.presimsetup ];
+ then
+ ${CITESTPATH}/etc/workarounds.presimsetup || exit -1
+ fi
-# Run start_simics to populate simics directories.
-echo "----Setting up simics."
-execute_in_sandbox "start_simics -no_start -machine $MACHINE -batch_mode" \
- "ppc" || exit -1
+ # Run start_simics to populate simics directories.
+ echo "----Setting up simics."
+ execute_in_sandbox "start_simics -no_start -machine $MACHINE_TYPE -batch_mode" \
+ "ppc" || exit -1
-# Run postsimsetup workarounds.
-echo "----Running postsimsetup workarounds."
-if [ -f ${CITESTPATH}/etc/workarounds.postsimsetup ];
-then
- ${CITESTPATH}/etc/workarounds.postsimsetup || exit -1
+ # Run postsimsetup workarounds.
+ echo "----Running postsimsetup workarounds."
+ if [ -f ${CITESTPATH}/etc/workarounds.postsimsetup ];
+ then
+ ${CITESTPATH}/etc/workarounds.postsimsetup || exit -1
+ fi
fi
-
diff --git a/src/test/framework/populate-sandbox b/src/test/framework/populate-sandbox
index f765d8fc..8fc16243 100755
--- a/src/test/framework/populate-sandbox
+++ b/src/test/framework/populate-sandbox
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2018
+# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
@@ -57,4 +57,37 @@ execute_in_sandbox "cd $SBEFW_DIR; mk install_all" \
# Copy test files.
-cp -r $SBEROOT/src/test/testcases/* $SBETESTDIR/ || exit -1
+if [ "$MACHINE_TYPE" = "NIMBUS" ]; then
+
+ cp -r $SBEROOT/src/test/testcases/* $SBETESTDIR/ || exit -1
+
+elif [ "$MACHINE_TYPE" = "AXONE" ]; then
+
+ echo "Untar simics.tar.gz into the sandbox"
+ tar -xf $SIMICS_TAR/simics.tar.gz -C $SANDBOXBASE/simics/ || exit -1
+
+ echo "Create the test directory for axone"
+ mkdir -p $SANDBOXBASE/simics/targets/p9_axone/sbeTest/ || exit -1
+
+ echo "Copy binary to simics workspace"
+ cp $SANDBOXBASE/images/ppc/lab/flash/sbe_seeprom_p9a_10.bin.ecc $SBEROMDIRAXONE/ || exit -1
+
+ echo "Copy engd (scandef.abr) from backing build"
+ cp $BACKING_BUILD/obj/ppc/simu/data/cec-chip/scandef.abr $SANDBOXBASE/simics/import/cec-chip/scandef.abr || exit -1
+
+ echo "Copy test files."
+ cp $SANDBOXBASE/obj/ppc/simu/scripts/sbfw/* $SBETESTDIRAXONE/ || exit -1
+ cp $SBEROOT/src/import/chips/p9/security/p9_security_white_black_list.csv $SBETESTDIRAXONE/ || exit -1
+ cp $SBEROOT/src/build/security/securityRegListGen.py $SBETESTDIRAXONE/ || exit -1
+ cp $SBEROOT/src/tools/debug/simics/sbe_startupAxone.simics $SBETESTDIRAXONE/ || exit -1
+ cp $SBEROOT/src/test/testcases/testAxone.simics $SBETESTDIRAXONE/ || exit -1
+
+ echo "Copy fsp-trace"
+ execute_in_sandbox "which fsp-trace > $SBETESTDIRAXONE/.fsp_trace_path" "ppc" || exit -1
+ fsp_trace_path=`cat $SBETESTDIRAXONE/.fsp_trace_path` || exit -1
+ rm $SBETESTDIRAXONE/.fsp_trace_path || exit -1
+ cp $fsp_trace_path $SBETESTDIRAXONE || exit -1
+
+ echo "Install simics"
+ $SANDBOXBASE/simics/INSTALL.sh || exit -1
+fi
diff --git a/src/test/framework/setup-env b/src/test/framework/setup-env
index 69b05c40..c2dba1d0 100755
--- a/src/test/framework/setup-env
+++ b/src/test/framework/setup-env
@@ -6,7 +6,7 @@
#
# OpenPOWER sbe Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
@@ -75,8 +75,11 @@ export -f execute_in_sandbox
# Setup machine type.
export MACHINE=${MACHINE:-$DEFAULT_MACHINE}
+export MACHINE=$MACHINE:AXONE
export SBETESTDIR=$SANDBOXBASE/simics/targets/p9_nimbus/sbeTest
+export SBETESTDIRAXONE=$SANDBOXBASE/simics/targets/p9_axone/sbeTest/
+export SBEROMDIRAXONE=$SANDBOXBASE/simics/import/boot_roms/
export SBEFW_DIR=$SANDBOXBASE/src/sbei/sbfw/
export SBEFW_IMG_DIR=$SANDBOXBASE/src/sbei/sbfw/img
export AUTOSIM_FFDC_XML=$SBETESTDIR/ffdc.xml
OpenPOWER on IntegriCloud