Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fe966218 authored by TAVERNIER Vincent's avatar TAVERNIER Vincent
Browse files

Fix locally running tests and some install bugs

parent 8d614768
No related branches found
No related tags found
No related merge requests found
root = true
[*]
indent_style = tab
indent_size = 4
obj-*/
build/
*.sublime-workspace
......@@ -84,8 +84,8 @@ set_property(TARGET shadertoy PROPERTY CXX_STANDARD 14)
# Include directories for install
set_property(TARGET shadertoy APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${INCLUDE_DIR}/shadertoy>
$<INSTALL_INTERFACE:include/shadertoy>
$<BUILD_INTERFACE:${INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:${Boost_INCLUDE_DIR}>)
# Precompiled header optimization
......
......@@ -32,4 +32,6 @@ done
# Else, default build
./configure.sh "$@"
cd build
make -j9
if make -j9; then
make DESTDIR=$(pwd)/install install
fi
libshadertoy-dev_0.0.1_amd64.deb libdevel optional
libshadertoy0_0.0.1_amd64.deb libs optional
#!/bin/bash
if [ -z "$LIBSHADERTOY_DIR" ]; then
LIBSHADERTOY_DIR=/usr/share/shadertoy
fi
if [ -z "$CMAKE_EXTRA_OPTS" ]; then
CMAKE_EXTRA_OPTS=""
fi
# Copy example from datadir
cp -r /usr/share/shadertoy/examples/00-build "$AUTOPKGTEST_TMP"
cp -r "$LIBSHADERTOY_DIR/examples/00-build" "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP/00-build"
# Configure
......@@ -9,7 +17,7 @@ set -eo pipefail
mkdir build
cd build
cmake ..
cmake $CMAKE_EXTRA_OPTS ..
# Build
make -j VERBOSE=1
......
......@@ -3,11 +3,11 @@
/**
* @brief Helper macro to declare a uniform instance
*/
#define DECLARE_UNIFORM(type, name) extern const char name ## Name []; typedef shadertoy::ShaderInput<name ## Name, type> name
#define DECLARE_UNIFORM(type, name) extern const char name ## Name []; typedef ShaderInput<name ## Name, type> name
/**
* @brief Helper macro to declare a uniform instance as an array
*/
#define DECLARE_UNIFORM_N(type, name, n) extern const char name ## Name []; typedef shadertoy::ShaderInput<name ## Name, type, n> name
#define DECLARE_UNIFORM_N(type, name, n) extern const char name ## Name []; typedef ShaderInput<name ## Name, type, n> name
#endif
#else /* IMPLEMENT_UNIFORM_STATE */
#undef DECLARE_UNIFORM
......
#ifndef _SHADERTOY_PRE_HPP_
#define _SHADERTOY_PRE_HPP_
#include "shadertoy/config.hpp"
#include <oglplus/all.hpp>
#include <boost/filesystem.hpp>
......
{
"folders": [
{
"folder_exclude_patterns": [
"obj-x86_64-linux-gnu",
"debian/tmp",
"debian/.debhelper",
"debian/libshadertoy0",
"debian/libshadertoy-dev"
],
"path": "."
}
]
}
\ No newline at end of file
test.sh 0 → 100755
#!/bin/bash
for TEST_FILE in debian/tests/*; do
if [ -x "$TEST_FILE" ]; then
TEST_NAME=$(basename "$TEST_FILE")
echo "[==== RUNNING TEST: $TEST_NAME ====]" >&2
# Create temporary directory
TEST_DIR=`mktemp -d`
export AUTOPKGTEST_TMP="$TEST_DIR"
# Setup special vars
export LIBSHADERTOY_DIR=$(pwd)/build/install/usr/local/share/shadertoy
export CMAKE_EXTRA_OPTS="-DCMAKE_PREFIX_PATH=$(pwd)/build/install/usr/local"
# Execute test
"$TEST_FILE"
TEST_RESULT=$?
if [ "$TEST_RESULT" -eq 0 ]; then
echo "[==== TEST: $TEST_NAME: PASSED ====]" >&2
else
echo "[==== TEST: $TEST_NAME: FAILED ($TEST_RESULT) ====]" >&2
fi
# Cleanup
rm -rf "$TEST_DIR"
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment