Skip to content

Commit

Permalink
fbas: timing RTE: deploy the test artifacts
Browse files Browse the repository at this point in the history
In this case, test artifact includes a plain text file with timing events,
which will be injected locally with 'saft-dm'.
(used in test_ttf_count_mps_events.sh)
  • Loading branch information
ebold-cscotos committed Jul 19, 2023
1 parent a6dd69a commit 269cd4d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 6 deletions.
13 changes: 9 additions & 4 deletions modules/fbas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ ARCH = x86_64
TARGET_RTE ?= fbas
YOCTO_TARGET_RTE ?=$(TARGET_RTE)-yocto

.SILENT .PHONY: check deploy check-yocto-rte deploy-yocto-rte firmware
.SILENT .PHONY: check-sl7-rte deploy-sl7-rte check-yocto-rte deploy-yocto-rte firmware

# deploy FBAS artifacts to the RTE directory
deploy:
# deploy FBAS artifacts to the RTE directory (for sl7 ramdisk)
deploy-sl7-rte:
# TR LM32 firmware
echo deploy '$(FW)/*.bin' to '$(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/firmware'
mkdir -p $(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/firmware
Expand All @@ -28,6 +28,11 @@ deploy:
echo deploy '$(TEST)/scu/*.sh to $(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/$(ARCH)/bin'
cp -u -p $(TEST)/scu/*.sh $(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/$(ARCH)/bin

# test artifacts (ie., schedule for local injection)
echo deploy '$(TEST)/scu/*.sched to $(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/test'
mkdir -p $(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/test
cp -u -p $(TEST)/scu/*.sched $(NFSBASE)/$(TIMING_RTE)/$(TARGET_RTE)/test

# RTE script for NFSinit symlink
echo deploy '$(ASL)/timing-rte-$(TARGET_RTE)' to '$(NFSBASE)/nfsinit/global'
cp -u -p $(ASL)/timing-rte-$(TARGET_RTE) $(NFSBASE)/nfsinit/global
Expand All @@ -41,7 +46,7 @@ deploy-yocto-rte:
TARGET_RTE=$(YOCTO_TARGET_RTE) NFSBASE_PATH=$(NFSBASE) ARCH=$(ARCH) ./rte/deploy-yocto-rte.sh

# check if target RTE is built
check:
check-sl7-rte:
TARGET_RTE=$(TARGET_RTE) NFSBASE_PATH=$(NFSBASE) ARCH=$(ARCH) ./$(RTE)/check-rte.sh

check-yocto-rte:
Expand Down
5 changes: 3 additions & 2 deletions modules/fbas/rte/asl/loader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

ARCH=$(/bin/uname -m)

cp $1/$ARCH/bin/* /usr/bin
cp $1/firmware/* /home/root
cp $1/$ARCH/bin/* /usr/bin # test scripts
cp $1/firmware/* /home/root # firmware binaries
cp $1/test/* /home/root # test artifacts
3 changes: 3 additions & 0 deletions modules/fbas/rte/asl/timing-rte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ fi
log 'copying firmware to ramdisk'
cp -a /opt/$NAME/firmware/* /

log 'copying test artifacts to ramdisk'
cp -a /opt/$NAME/test/* /

log 'starting services'
# start saftlib for multiple devices: saftd tr0:dev/wbm0 tr1:dev/wbm1 tr2:dev/wbm2 ... trXYZ:dev/wbmXYZ
saftlib_devices=$(for dev in /dev/wbm*; do echo tr${dev#/dev/wbm}:${dev#/}; done)
Expand Down
20 changes: 20 additions & 0 deletions modules/fbas/rte/check-rte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,27 @@ setup_rte_build() {
sed -i "s|^DEPLOY_TARGET=.*|DEPLOY_TARGET=\"$TARGET_RTE_PATH\"|" $TIMING_RTE_BUILDER
}

check_fbas_stuff() {

# check the presence of the FBAS stuff
ls $TARGET_RTE_PATH/firmware/*.bin
if [ $? -eq 0 ]; then
echo "PASS: FBAS LM32 firmware is available: $TARGET_RTE_PATH/firmware/*.bin"
else
echo "FAIL: FBAS LM32 firmware is not found: $TARGET_RTE_PATH/firmware/*.bin"
fi

ls $TARGET_RTE_PATH/test/*.sched
if [ $? -eq 0 ]; then
echo "PASS: FBAS test schedules are available: $TARGET_RTE_PATH/test/*.sched"
else
echo "FAIL: FBAS test schedules are not found: $TARGET_RTE_PATH/test/*.sched"
fi

}

check_rte_location
check_rte_builder
check_rte_builder_settings
check_nfsinit_scripts
check_fbas_stuff
8 changes: 8 additions & 0 deletions modules/fbas/rte/check-yocto-rte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ check_fbas_stuff() {
else
echo "FAIL: FBAS test scripts are not found: $TARGET_RTE_PATH/$ARCH/bin/*.sh"
fi

ls $TARGET_RTE_PATH/test/*.sched
if [ $? -eq 0 ]; then
echo "PASS: FBAS test schedules are available: $TARGET_RTE_PATH/test/*.sched"
else
echo "FAIL: FBAS test schedules are not found: $TARGET_RTE_PATH/test/*.sched"
fi

}

check_rte_location
Expand Down
6 changes: 6 additions & 0 deletions modules/fbas/rte/deploy-yocto-rte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ deploy_fbas_artifacts() {
echo "deploy $TEST_PATH/scu/*.sh to $TARGET_RTE_PATH/$ARCH/bin"
mkdir -p $TARGET_RTE_PATH/$ARCH/bin
cp -u -p $TEST_PATH/scu/*.sh $TARGET_RTE_PATH/$ARCH/bin

# test artifacts
echo "deploy $TEST_PATH/scu/*.sched to $TARGET_RTE_PATH/test"
mkdir -p $TARGET_RTE_PATH/test
cp -u -p $TEST_PATH/scu/*.sched $TARGET_RTE_PATH/test

}

deploy_rte_scripts() {
Expand Down

0 comments on commit 269cd4d

Please sign in to comment.