From 91f900003843456542cd0e28075ee7ffe9a4d242 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 11 Jun 2020 16:09:58 +0200 Subject: [PATCH] unit-tests: allow FPGA configuration to provided via env var --- fpga/tests/fpga.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fpga/tests/fpga.cpp b/fpga/tests/fpga.cpp index 45dd80968..67885175a 100644 --- a/fpga/tests/fpga.cpp +++ b/fpga/tests/fpga.cpp @@ -62,7 +62,8 @@ static void init() auto vfioContainer = VfioContainer::create(); /* Parse FPGA configuration */ - f = fopen(TEST_CONFIG, "r"); + char *fn = getenv("TEST_CONFIG"); + f = fopen(fn ? fn : TEST_CONFIG, "r"); cr_assert_not_null(f, "Cannot open config file"); json_t *json = json_loadf(f, 0, &err);