mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
fix 32 bit test (#953)
* fix tests for 32 bit mode * fix issues with mongoose build * Update docker.yml
This commit is contained in:
parent
3587c0419c
commit
b724f502b3
30
.github/workflows/docker.yml
vendored
30
.github/workflows/docker.yml
vendored
@ -1,31 +1,19 @@
|
||||
name: Test Docker Hub Images
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
jobs:
|
||||
centos7:
|
||||
latest:
|
||||
runs-on: ubuntu-18.04
|
||||
container: docker://nasatrick/trick_centos7:latest
|
||||
container: docker://nasatrick/${{matrix.container}}:latest
|
||||
strategy:
|
||||
matrix:
|
||||
container: [trick_centos7, trick_centos8, trick_ubuntu1804]
|
||||
steps:
|
||||
- name: run tests
|
||||
run: |
|
||||
cd /trick*
|
||||
make test
|
||||
|
||||
centos8:
|
||||
runs-on: ubuntu-18.04
|
||||
container: docker://nasatrick/trick_centos8:latest
|
||||
steps:
|
||||
- name: run tests
|
||||
run: |
|
||||
cd /trick*
|
||||
make test
|
||||
|
||||
ubuntu1804:
|
||||
runs-on: ubuntu-18.04
|
||||
container: docker://nasatrick/trick_ubuntu1804:latest
|
||||
steps:
|
||||
- name: run tests
|
||||
run: |
|
||||
cd /trick*
|
||||
make test
|
||||
|
||||
|
57
.github/workflows/test.yml
vendored
57
.github/workflows/test.yml
vendored
@ -88,7 +88,7 @@ jobs:
|
||||
run: make test
|
||||
|
||||
macOS:
|
||||
runs-on: macOS-latest
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@master
|
||||
@ -169,3 +169,58 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
trick_32bit:
|
||||
runs-on: ubuntu-18.04
|
||||
container: docker://centos:7
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@master
|
||||
- name: Add yum repo
|
||||
run: yum -y install epel-release.noarch
|
||||
- name: Install dependency group
|
||||
run: yum -y groupinstall "Development tools"
|
||||
- name: Install other dependencies
|
||||
run: >
|
||||
yum install -y llvm llvm-devel llvm-static clang clang-devel
|
||||
install bison flex gcc gcc-c++ libxml2-devel make cmake wget
|
||||
ncurses-devel openmotif openmotif-devel python-devel perl
|
||||
perl-Digest-MD5 swig zlib-devel glibc.x86_64 libxml2-devel.i686
|
||||
ncurses-devel.i686 zlib-devel.i686 python-libs.i686
|
||||
expat-2.1.0-10.el7_3.i686 glibc-devel-2.17-196.el7.i686
|
||||
glibc.i686 glibc-devel.i686 udunits2 udunits2-devel gtest-devel.i686
|
||||
java-1.8.0-openjdk java-1.8.0-openjdk-devel expat-devel.i686
|
||||
which gcc-gfortran git wget gsl-devel gtest-devel gsl-devel.i686
|
||||
maven udunits2 udunits2-devel
|
||||
- name: Symlink python
|
||||
run: |
|
||||
cd /usr/lib
|
||||
ln -s ./libpython2.7.so.1.0 libpython2.7.so
|
||||
- name: Install Udunits (32 bit)
|
||||
run: |
|
||||
curl --retry 4 -O https://www.unidata.ucar.edu/downloads/udunits/udunits-2.2.26.tar.gz
|
||||
tar xfvz udunits-2.2.26.tar.gz
|
||||
rm udunits-2.2.26.tar.gz
|
||||
cd udunits-2.2.26
|
||||
export CFLAGS="-m32"
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make install
|
||||
- name: Install GTest (32 bit)
|
||||
run: |
|
||||
wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
|
||||
tar xfvz release-1.8.0.tar.gz
|
||||
cd googletest-release-1.8.0/googletest
|
||||
export CFLAGS="-m32"
|
||||
export CXXFLAGS="-m32"
|
||||
cmake .
|
||||
make
|
||||
make install
|
||||
- name: Build Trick
|
||||
run: |
|
||||
yum -y update && yum clean all
|
||||
export MAKEFLAGS=-j4
|
||||
./configure --without-hdf5 --enable-32bit
|
||||
make
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
2
Makefile
2
Makefile
@ -238,7 +238,7 @@ ${TRICK_LIB_DIR}/libmongoose.a: ${TRICK_HOME}/include/mongoose/mongoose.h | mong
|
||||
ifeq (${TRICK_OFFLINE}, 0)
|
||||
|
||||
mongoose.o: mongoose.h mongoose.c
|
||||
$(CC) $(TRICK_CFLAGS) -c -o mongoose.o mongoose.c
|
||||
$(CC) $(TRICK_CFLAGS) ${TRICK_SYSTEM_CXXFLAGS} -c -o mongoose.o mongoose.c
|
||||
@ rm mongoose.c
|
||||
|
||||
${TRICK_HOME}/include/mongoose/mongoose.h: mongoose.h | ${TRICK_HOME}/include/mongoose
|
||||
|
@ -18,7 +18,7 @@ The Trick Simulation Environment, developed at the NASA Johnson Space Center, is
|
||||
<table>
|
||||
<col width="33%">
|
||||
<col width="33%">
|
||||
<col width="33%">
|
||||
<col width="33%">babfba=
|
||||
<thead>
|
||||
<tr>
|
||||
<th><a href="https://nasa.github.io/trick/documentation/install_guide/Install-Guide">Install Guide</a></th>
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**
|
||||
PURPOSE: (Integrator Base Class)
|
||||
*/
|
||||
#if defined(TRICK_VER)
|
||||
#if defined(TRICK_VER) && !defined(TEST)
|
||||
#include "trick/memorymanager_c_intf.h"
|
||||
#define INTEG_NEW(class) (class*)TMM_declare_var_1d(#class,1)
|
||||
#define INTEG_ALLOC(typespec, num) (typespec*)TMM_declare_var_1d(#typespec,(num))
|
||||
|
@ -175,7 +175,7 @@ ifeq (${TRICK_MONGOOSE},1)
|
||||
TRICK_LIBS += -ltrickHTTP ${TRICK_LIB_DIR}/libmongoose.a
|
||||
TRICK_SWIG_FLAGS += -DUSE_MONGOOSE
|
||||
TRICK_SYSTEM_CXXFLAGS += -DUSE_MONGOOSE
|
||||
TRICK_ICG_EXCLUDE += ${TRICK_HOME}/include/mongoose
|
||||
TRICK_ICG_EXCLUDE += :${TRICK_HOME}/include/mongoose
|
||||
endif
|
||||
|
||||
# We pipe the output of compiler through tee. If the user wanted gcc color, make sure they get it.
|
||||
|
BIN
test/SIM_test_dr/RUN_test/Ref_Logs/log_DR_typesBINARY_32.trk
Normal file
BIN
test/SIM_test_dr/RUN_test/Ref_Logs/log_DR_typesBINARY_32.trk
Normal file
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
TRICK_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))..)
|
||||
export TRICK_HOST_CPU := $(shell $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
SIMS_TO_COMPILE_ONLY = \
|
||||
SIM_alloc_test \
|
||||
@ -69,5 +70,8 @@ data_record_results: $(TRICK_HOME)/trick_test/SIM_test_dr.xml $(DR_RESULTS)
|
||||
diff $(DR_RESULTS)/log_DR_bitfieldsASCII.csv $(DR_RESULTS)/Ref_Logs/log_DR_bitfieldsASCII_Master.csv
|
||||
diff $(DR_RESULTS)/log_DR_typesASCII.csv $(DR_RESULTS)/Ref_Logs/log_DR_typesASCII_Master.csv
|
||||
cmp -b $(DR_RESULTS)/log_DR_bitfieldsBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_bitfieldsBINARY.trk
|
||||
ifeq (${TRICK_FORCE_32BIT}, 1)
|
||||
cmp -b $(DR_RESULTS)/log_DR_typesBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_typesBINARY_32.trk
|
||||
else
|
||||
cmp -b $(DR_RESULTS)/log_DR_typesBINARY.trk $(DR_RESULTS)/Ref_Logs/log_DR_typesBINARY.trk
|
||||
|
||||
endif
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
LIBS = -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
TRICK_LIBS = -L ${TRICK_LIB_DIR} -ltrick_mm -ltrick_units -ltrick
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include/trick/compat -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -DUSE_ER7_UTILS_INTEGRATORS=1
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -I${TRICK_HOME}/trick_source -I${TRICK_HOME}/include/trick/compat -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 -DUSE_ER7_UTILS_INTEGRATORS=1 -DTEST ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_mm -ltrick_units -ltrick -ltrick_mm
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main
|
||||
|
@ -11,7 +11,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Mak
|
||||
#TRICK_SYSTEM_LDFLAGS += ${COVERAGE_FLAGS}
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra ${COVERAGE_FLAGS} -std=c++11
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra ${COVERAGE_FLAGS} -std=c++11 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick_mm -ltrick_units -ltrick -ltrick_mm -ltrick_units -ltrick
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick_mm -ltrick_units -ltrick -ltrick_mm -ltrick_units -ltrick
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))../../../../share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
TRICK_LIBS = -L${TRICK_LIB_DIR} -ltrick -ltrick_units -ltrick_mm
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread
|
||||
|
||||
|
@ -7,7 +7,7 @@ INCLUDE_DIRS = -I$(GTEST_HOME) -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include
|
||||
# Use the trick_comm library only. libtrick.a would also work.
|
||||
TRICK_LIBS := ${TRICK_LIB_DIR}/libtrick_comm.a
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main
|
||||
TRICK_CXXFLAGS += ${INCLUDE_DIRS} -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CXXFLAGS += ${INCLUDE_DIRS} -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
# Automatically determine all executable names produced by this Makefile.
|
||||
TESTS = comm_test
|
||||
|
@ -8,7 +8,7 @@
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread
|
||||
|
@ -8,7 +8,7 @@
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick_math.a
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main -lpthread
|
||||
|
@ -8,7 +8,7 @@
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I$(GTEST_HOME)/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick.a
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lpthread
|
||||
|
@ -7,7 +7,7 @@
|
||||
include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
|
||||
|
||||
# Flags passed to the preprocessor.
|
||||
TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0
|
||||
TRICK_CPPFLAGS += -I${GTEST_HOME}/include -I$(TRICK_HOME)/include -g -Wall -Wextra -DGTEST_HAS_TR1_TUPLE=0 ${TRICK_SYSTEM_CXXFLAGS}
|
||||
|
||||
TRICK_LIBS = ${TRICK_LIB_DIR}/libtrick_units.a
|
||||
TRICK_EXEC_LINK_LIBS += -L${GTEST_HOME}/lib64 -L${GTEST_HOME}/lib -lgtest -lgtest_main
|
||||
|
@ -33,7 +33,7 @@ TRICK_HTTP_OBJS = \
|
||||
all: ${TRICK_LIB_DIR}/libtrickHTTP.a
|
||||
|
||||
$(TRICK_HTTP_OBJS): $(OBJDIR)/%.o : src/%.cpp | $(OBJDIR)
|
||||
$(CPP) $(CPPFLAGS) ${INCLUDE_DIRS} -c $< -o $@
|
||||
$(CPP) $(CPPFLAGS) ${TRICK_SYSTEM_CXXFLAGS} ${INCLUDE_DIRS} -c $< -o $@
|
||||
|
||||
${TRICK_LIB_DIR}/libtrickHTTP.a: ${TRICK_HTTP_OBJS}
|
||||
ar crs $@ ${TRICK_HTTP_OBJS}
|
||||
|
Loading…
Reference in New Issue
Block a user