Commit b0f9fe78 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Test: use EIGER_CONFIG environment variable as default configuration file

parent 02fa9ffc
......@@ -46,6 +46,7 @@ TestApp::Pars::Pars()
void TestApp::Pars::loadDefaults()
{
DEB_MEMBER_FUNCT();
config_fname = getenv("EIGER_CONFIG");
nb_frames = 10;
exp_time = 2.0e-3;
frame_period = 2.5e-3;
......
......@@ -362,11 +362,14 @@ int main(int argc, char *argv[])
{
DEB_GLOBAL_FUNCT();
if (argc < 2) {
DEB_ERROR() << "Must provide configuration file";
exit(1);
string config_fname = getenv("EIGER_CONFIG");
if (config_fname.empty()) {
if (argc < 2) {
DEB_ERROR() << "Must provide configuration file";
exit(1);
}
config_fname = argv[1];
}
string config_fname = argv[1];
string par;
if (argc > 2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment