shaka-packager/packager/media
Joey Parrish 899f763dd7
test: Fix data directory computation (#1239)
The `__FILE__` macro does not always get you an absolute path, so our
assumptions about it in test_data_util.cc were flawed.

If `foo.c` references `__FILE__`, something like `gcc -c foo.c`, will
define `__FILE__` as `"foo.c"`. If you use `gcc -c /path/to/foo.c`, then
`__FILE__` will be `"/path/to/foo.c"`.

The Ninja generator for CMake only generates absolute paths for source
files in certain CMake versions. (Exact range unknown.) Rather than
require newer CMake versions and depend on CMake's Ninja generator
maintaining the latest behavior forever, set the macro TEST_DATA_DIR to
point to the test data folder. This is consistent and never depends on
unspecified behavior.

This change will allow the use of the Ninja generator with older
versions of CMake, as found in most of our Docker builds.
2023-07-17 10:06:10 -07:00
..
base fix: Fix compilation on Arch Linux (#1233) 2023-07-14 12:40:12 -07:00
chunking fix: Fix compilation on Arch Linux (#1233) 2023-07-14 12:40:12 -07:00
codecs feat: port media/codecs to CMake (#1143) 2022-12-15 16:53:36 -08:00
crypto feat: Cmake port of Media crypto (#1221) 2023-07-14 08:19:01 -07:00
demuxer chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
event feat: port media/event to CMake (#1222) 2023-07-13 16:25:42 -07:00
formats Merge remote-tracking branch 'upstream/main' into cmake 2023-07-05 19:51:52 -07:00
origin feat: CMake port media/origin (#1145) 2022-11-30 09:43:58 -08:00
public feat: port media/public/ (#1117) 2022-10-24 19:08:37 -07:00
replicator feat: CMake port media/replicator (#1144) 2022-11-30 12:01:25 -08:00
test test: Fix data directory computation (#1239) 2023-07-17 10:06:10 -07:00
trick_play feat: CMake port media/trick_play (#1146) 2023-05-01 14:57:40 -07:00
CMakeLists.txt feat: Cmake port of Media crypto (#1221) 2023-07-14 08:19:01 -07:00