shaka-packager/packager
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
..
app Merge remote-tracking branch 'upstream/main' into cmake 2023-07-05 19:51:52 -07:00
file fix: Fix compilation on Arch Linux (#1233) 2023-07-14 12:40:12 -07:00
hls Merge remote-tracking branch 'upstream/main' into cmake 2023-07-05 19:51:52 -07:00
kv_pairs chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
media test: Fix data directory computation (#1239) 2023-07-17 10:06:10 -07:00
mpd feat: port media/event to CMake (#1222) 2023-07-13 16:25:42 -07:00
status fix: Fix status library headers and move test (#1118) 2022-10-24 19:09:10 -07:00
testing fix: Fix compilation on Arch Linux (#1233) 2023-07-14 12:40:12 -07:00
third_party chore: Revert to upstream mongoose (#1235) 2023-07-16 16:49:29 -07:00
tools fix: Fix type error in pssh-box.py with Python 3.10+ (#1187) 2023-05-01 09:10:11 -07:00
utils feat: port media/codecs to CMake (#1143) 2022-12-15 16:53:36 -08:00
version fix: Fix compilation on Arch Linux (#1233) 2023-07-14 12:40:12 -07:00
CMakeLists.txt fix: Fix compilation on Arch Linux (#1233) 2023-07-14 12:40:12 -07:00
common.gypi chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
flag_saver.h chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
macros.h feat: port media/base (#1127) 2022-11-04 15:46:41 -07:00
packager.cc chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
packager.gyp chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
packager.h chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
packager_test.cc chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
policies.cmake chore: Split out CMake policies into package/policies.cmake (#1236) 2023-07-17 06:41:23 -07:00
protobuf.cmake feat: port media/event to CMake (#1222) 2023-07-13 16:25:42 -07:00