automatic install resource detection code is broken
Hi,
After building belr and its tester on Guix, and having installed it this way:
$ tree /gnu/store/25wcq0p9dqxsqmj3126xfy31s8f9vv09-belr-4.4.34-tester
/gnu/store/25wcq0p9dqxsqmj3126xfy31s8f9vv09-belr-4.4.34-tester
├── bin
│ └── belr_tester
└── share
├── belr_tester
│ └── res
│ ├── basicgrammar.txt
│ ├── register.txt
│ ├── response.txt
│ ├── sipgrammar.txt
│ └── vcardgrammar.txt
└── doc
└── belr-4.4.34
└── LICENSE.txt
6 directories, 7 files
I was surprised that running the belr_tester binary would fail locating its own resources.
It turns out this is caused by this code https://gitlab.linphone.org/BC/public/bctoolbox/-/blob/master/src/tester.c#L1066, which takes precedence over the (correctly resolved) installed_resources_path
variable. I'm not sure under which condition it is expected that CWD or its parent would not exist; that seems an odd check to me. I've patched out these two checks locally and now it works as I would expect.