1*02ca8ccaSAndroid Build Coastguard Worker#!/bin/bash 2*02ca8ccaSAndroid Build Coastguard Worker################################################################################# 3*02ca8ccaSAndroid Build Coastguard Worker# Copyright 2018 ARM. All rights reserved. 4*02ca8ccaSAndroid Build Coastguard Worker# 5*02ca8ccaSAndroid Build Coastguard Worker# Redistribution and use in source and binary forms, with or without modification, 6*02ca8ccaSAndroid Build Coastguard Worker# are permitted provided that the following conditions are met: 7*02ca8ccaSAndroid Build Coastguard Worker# 8*02ca8ccaSAndroid Build Coastguard Worker# 1. Redistributions of source code must retain the above copyright notice, 9*02ca8ccaSAndroid Build Coastguard Worker# this list of conditions and the following disclaimer. 10*02ca8ccaSAndroid Build Coastguard Worker# 11*02ca8ccaSAndroid Build Coastguard Worker# 2. Redistributions in binary form must reproduce the above copyright notice, 12*02ca8ccaSAndroid Build Coastguard Worker# this list of conditions and the following disclaimer in the documentation 13*02ca8ccaSAndroid Build Coastguard Worker# and/or other materials provided with the distribution. 14*02ca8ccaSAndroid Build Coastguard Worker# 15*02ca8ccaSAndroid Build Coastguard Worker# 3. Neither the name of the copyright holder nor the names of its contributors 16*02ca8ccaSAndroid Build Coastguard Worker# may be used to endorse or promote products derived from this software without 17*02ca8ccaSAndroid Build Coastguard Worker# specific prior written permission. 18*02ca8ccaSAndroid Build Coastguard Worker# 19*02ca8ccaSAndroid Build Coastguard Worker# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND 20*02ca8ccaSAndroid Build Coastguard Worker# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21*02ca8ccaSAndroid Build Coastguard Worker# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22*02ca8ccaSAndroid Build Coastguard Worker# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 23*02ca8ccaSAndroid Build Coastguard Worker# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24*02ca8ccaSAndroid Build Coastguard Worker# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25*02ca8ccaSAndroid Build Coastguard Worker# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26*02ca8ccaSAndroid Build Coastguard Worker# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27*02ca8ccaSAndroid Build Coastguard Worker# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28*02ca8ccaSAndroid Build Coastguard Worker# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29*02ca8ccaSAndroid Build Coastguard Worker# 30*02ca8ccaSAndroid Build Coastguard Worker################################################################################# 31*02ca8ccaSAndroid Build Coastguard Worker# OpenCSD library: Test script. 32*02ca8ccaSAndroid Build Coastguard Worker# 33*02ca8ccaSAndroid Build Coastguard Worker# Test script to run packet lister on each of the snapshots retained with the repository. 34*02ca8ccaSAndroid Build Coastguard Worker# No attempt is made to compare output results to previous versions, (output formatting 35*02ca8ccaSAndroid Build Coastguard Worker# may change due to bugfix / enhancements) or assess the validity of the trace output. 36*02ca8ccaSAndroid Build Coastguard Worker# 37*02ca8ccaSAndroid Build Coastguard Worker################################################################################# 38*02ca8ccaSAndroid Build Coastguard Worker 39*02ca8ccaSAndroid Build Coastguard WorkerOUT_DIR=./results 40*02ca8ccaSAndroid Build Coastguard WorkerSNAPSHOT_DIR=./snapshots 41*02ca8ccaSAndroid Build Coastguard WorkerBIN_DIR=./bin/linux64/rel 42*02ca8ccaSAndroid Build Coastguard Worker 43*02ca8ccaSAndroid Build Coastguard Workerecho "Running trc_pkt_lister on snapshot directories." 44*02ca8ccaSAndroid Build Coastguard Worker 45*02ca8ccaSAndroid Build Coastguard Workermkdir -p ${OUT_DIR} 46*02ca8ccaSAndroid Build Coastguard Worker 47*02ca8ccaSAndroid Build Coastguard Worker# === test the decode set === 48*02ca8ccaSAndroid Build Coastguard Workerexport LD_LIBRARY_PATH=${BIN_DIR}/. 49*02ca8ccaSAndroid Build Coastguard Worker 50*02ca8ccaSAndroid Build Coastguard Worker 51*02ca8ccaSAndroid Build Coastguard Worker# === test the C-API lib === 52*02ca8ccaSAndroid Build Coastguard Workerecho "Testing C-API" 53*02ca8ccaSAndroid Build Coastguard Worker${BIN_DIR}/c_api_pkt_print_test -ss_path ${SNAPSHOT_DIR} -decode 54*02ca8ccaSAndroid Build Coastguard Workermv ./c_api_test.log ./${OUT_DIR}/c_api_test.ppl 55