in my code a file is read from the ./etc folder but this does not work in common tests because when the test is launched a folder with this test is created which becomes current. How can the ./etc directory which is at the apps level be copied to the directory with the test when the test is launched?
_build
|_tests
|_logs
|_ct_run.abc@linux-9y35.localhost.2024-07-29_19.32.28
apps
etc
test
I had a similar problem time ago so I added code to rebar3 for dereferencing symbolic links in *_SUITE_data/
directories.
If you are using rebar3, you can create a relative symbolic link to your etc/
folder inside example_SUITE_data/
and rebar3 would do the rest. The data will get copied to the _build/test/lib/app/example_SUITE_data/
and you will be able to access it in the test using a path similar to filename:join( proplists:get_value(data_dir, Config), "etc")
.
Let me know if you need more help