libcamera/test/libtest/test.cpp
Kieran Bingham dd9429f438 tests: Remove IPA_MODULE_PATH environment variable
The tests declare a hard-coded LIBCAMERA_IPA_MODULE_PATH to allow tests
to run from the test-suite.

This requires tests to be run only from the root of the build directory,
otherwise (for example, by running in their local directory) they will
not be able to correctly locate the IPA modules.

Now that the build path for the IPA manager is determined at runtime we
can remove the redundant setting of the LIBCAMERA_IPA_MODULE_PATH for
tests.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-02-24 09:45:56 +00:00

37 lines
430 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2018, Google Inc.
*
* test.cpp - libcamera test base class
*/
#include <stdlib.h>
#include "test.h"
Test::Test()
{
}
Test::~Test()
{
}
int Test::execute()
{
int ret;
ret = setenv("LIBCAMERA_IPA_PROXY_PATH", "src/libcamera/proxy/worker", 1);
if (ret)
return errno;
ret = init();
if (ret)
return ret;
ret = run();
cleanup();
return ret;
}