Add a test for multiple values of OVNI_TRACEDIR

This commit is contained in:
Rodrigo Arias 2023-10-18 11:28:51 +02:00 committed by Rodrigo Arias Mallo
parent d1bf4e7520
commit 0db35980a0
3 changed files with 40 additions and 0 deletions

View File

@ -16,3 +16,4 @@ test_emu(clockgate.c MP SHOULD_FAIL REGEX "detected large clock gate")
test_emu(no-cpus.c SHOULD_FAIL REGEX "loom .* has no physical CPUs") test_emu(no-cpus.c SHOULD_FAIL REGEX "loom .* has no physical CPUs")
test_emu(sort-cpus-by-loom.c MP) test_emu(sort-cpus-by-loom.c MP)
test_emu(sort-cpus-by-rank.c MP) test_emu(sort-cpus-by-rank.c MP)
test_emu(tracedir-subdir.c MP DRIVER "tracedir-subdir.driver.sh")

View File

@ -0,0 +1,15 @@
/* Copyright (c) 2023 Barcelona Supercomputing Center (BSC)
* SPDX-License-Identifier: GPL-3.0-or-later */
#include <stdlib.h>
#include "compat.h"
#include "instr.h"
int
main(void)
{
instr_start(0, 1);
instr_end();
return 0;
}

View File

@ -0,0 +1,24 @@
target=$OVNI_TEST_BIN
# Test referring to a empty nested subdirectory
(
export OVNI_TRACEDIR=a/b/c
$target
ovniemu $OVNI_TRACEDIR
)
# Test referring to a parent directory
(
mkdir -p x/y/z
cd x/y/z
export OVNI_TRACEDIR=../../w
$target
ovniemu $OVNI_TRACEDIR
)
# Test with full path
(
export OVNI_TRACEDIR=$(pwd)/fullpath
$target
ovniemu $OVNI_TRACEDIR
)