|
| 1 | +#!/usr/bin/env bash |
| 2 | +############################################################################ |
| 3 | +# boards/arm64/qemu/qemu-armv8a/configs/citest_smp/run.sh |
| 4 | +# |
| 5 | +# SPDX-License-Identifier: Apache-2.0 |
| 6 | +# |
| 7 | +# Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 | +# contributor license agreements. See the NOTICE file distributed with |
| 9 | +# this work for additional information regarding copyright ownership. The |
| 10 | +# ASF licenses this file to you under the Apache License, Version 2.0 (the |
| 11 | +# "License"); you may not use this file except in compliance with the |
| 12 | +# License. You may obtain a copy of the License at |
| 13 | +# |
| 14 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | +# |
| 16 | +# Unless required by applicable law or agreed to in writing, software |
| 17 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 18 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 19 | +# License for the specific language governing permissions and limitations |
| 20 | +# under the License. |
| 21 | +# |
| 22 | +############################################################################ |
| 23 | + |
| 24 | +set -o xtrace |
| 25 | + |
| 26 | +# start from nuttx dir |
| 27 | +olddir=$(pwd) |
| 28 | +nuttdir=${CURRENTCONFDIR}/../../../../../../ |
| 29 | +cd ${nuttdir} |
| 30 | + |
| 31 | +# enable venv |
| 32 | +source ${NTFCDIR}/venv/bin/activate |
| 33 | + |
| 34 | +# run NTFC |
| 35 | +confpath=${CURRENTCONFDIR}/config.yaml |
| 36 | +jsonconf=${CURRENTCONFDIR}/session.json |
| 37 | +testpath=${NTFCDIR}/external/nuttx-testing |
| 38 | +python3 -m ntfc test --testpath=${testpath} --confpath=${confpath} --jsonconf=${jsonconf} |
| 39 | + |
| 40 | +ret="$?" |
| 41 | +echo $ret |
| 42 | + |
| 43 | +# disable venv |
| 44 | +deactivate |
| 45 | + |
| 46 | +# export test results |
| 47 | +artifacts=${ARTIFACTCONFDIR}/ntfc |
| 48 | +mkdir -p ${artifacts} |
| 49 | +mv pytest.debug.log ${artifacts} |
| 50 | +mv result ${artifacts} |
| 51 | + |
| 52 | +# restore old dir |
| 53 | +cd ${olddir} |
| 54 | + |
| 55 | +exit $ret |
0 commit comments