Skip to content

Commit

Permalink
don't use hardcoded path for rgb565 test files
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Feb 19, 2024
1 parent 444a07a commit 64d0f21
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/build/
/out/
/test/
/.vs/
/.vscode/
CMakeSettings.json
Expand Down
1 change: 1 addition & 0 deletions platforms/android/arm64-v8a/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ platforms/android/arm64-v8a/external.sh
cmake -DPLATFORM=android -DARCH=arm64-v8a -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp build/libzedmd.so ../../third-party/runtime-libs/android/arm64-v8a
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/ios/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ platforms/ios/arm64/external.sh
cmake -DPLATFORM=ios -DARCH=arm64 -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp build/libzedmd.a ../../third-party/build-libs/ios/arm64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include
cp third-party/runtime-libs/linux/aarch64/libserialport.so.0 ../../third-party/runtime-libs/linux/aarch64
cp build/libzedmd.so.0.5.0 ../../third-party/runtime-libs/linux/aarch64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include
cp third-party/runtime-libs/linux/x64/libserialport.so.0 ../../third-party/runtime-libs/linux/x64
cp build/libzedmd.so.0.5.0 ../../third-party/runtime-libs/linux/x64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/macos/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include
cp third-party/runtime-libs/macos/arm64/libserialport.dylib ../../third-party/runtime-libs/macos/arm64
cp build/libzedmd.0.5.0.dylib ../../third-party/runtime-libs/macos/arm64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/macos/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include
cp third-party/runtime-libs/macos/x64/libserialport.dylib ../../third-party/runtime-libs/macos/x64
cp build/libzedmd.0.5.0.dylib ../../third-party/runtime-libs/macos/x64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/tvos/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ platforms/tvos/arm64/external.sh
cmake -DPLATFORM=tvos -DARCH=arm64 -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp build/libzedmd.a ../../third-party/build-libs/tvos/arm64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/win/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ cp third-party/build-libs/win/x64/libserialport64.lib ../../third-party/build-li
cp third-party/runtime-libs/win/x64/libserialport64.dll ../../third-party/runtime-libs/win/x64
cp build/${BUILD_TYPE}/zedmd64.lib ../../third-party/build-libs/win/x64
cp build/${BUILD_TYPE}/zedmd64.dll ../../third-party/runtime-libs/win/x64
cp -r test ../../
cd ..

#
Expand Down
1 change: 1 addition & 0 deletions platforms/win/x86/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ cp third-party/build-libs/win/x86/libserialport.lib ../../third-party/build-libs
cp third-party/runtime-libs/win/x86/libserialport.dll ../../third-party/runtime-libs/win/x86
cp build/${BUILD_TYPE}/zedmd.lib ../../third-party/build-libs/win/x86
cp build/${BUILD_TYPE}/zedmd.dll ../../third-party/runtime-libs/win/x86
cp -r test ../../
cd ..

#
Expand Down
4 changes: 2 additions & 2 deletions src/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ int main(int argc, const char* argv[])
uint16_t size = width * height * 2;
uint8_t* buffer = (uint8_t*)malloc(size * sizeof(uint8_t));
uint16_t* rgb565 = (uint16_t*)malloc(size / 2 * sizeof(uint16_t));
char filename[128];
char filename[28];

for (int i = 1; i <= 100; i++)
{
snprintf(filename, 87, "external/libzedmd-7d2b0fc39475940b61b0126f3ff308dd193fe2a8/test/rgb565_%dx%d/%04d.raw",
snprintf(filename, 28, "test/rgb565_%dx%d/%04d.raw",
width, height, i);
printf("Render raw: %s\n", filename);
fileptr = fopen(filename, "rb");
Expand Down

0 comments on commit 64d0f21

Please sign in to comment.