diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 15c490c..3fe269f 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -19,47 +19,46 @@ jobs: submodules: 'recursive' # Build picotls and picoquic. - - run: | + - name: Install picotls + run: | sudo apt-get install -y libssl-dev ls -l ./ci ./ci/build_picotls.sh + - name: Install picoquic + run: | ./ci/build_picoquic.sh - - # Build pico_sim and run tests - - run: | - mkdir build - cd build - cmake .. - cmake --build . - make + - name: Install picoquic_ns + run: | + ./ci/build_picoquic_ns.sh + - name: Do simple tests + run: | ulimit -c unlimited -S # Iterate through all the scenarios - ./pico_sim -S ../../picoquic ../sim_specs/c4_alone.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_alone.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_alone_200.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_alone_200.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_vs_c4.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_vs_c4.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_after_c4.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_after_c4.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_before_c4.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_before_c4.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_vs_cubic.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_vs_cubic.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_wifi_fade.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_wifi_fade.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_wifi_suspension.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_wifi_suspension.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_media.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_media.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_media10.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_media10.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_media_wf.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_media_wf.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_media_ws.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_media_ws.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; - ./pico_sim -S ../../picoquic ../sim_specs/c4_short_long.txt && QDRESULT=$? + ../picoquic_ns/pico_sim -S ../../picoquic ./sim_specs/c4_short_long.txt && QDRESULT=$? if [ ${QDRESULT} != 0 ]; then exit 1; fi; exit 0 - - + diff --git a/CMakeLists.txt b/CMakeLists.txt index 830694e..3cd3526 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,19 +56,6 @@ target_link_libraries(pico_sim ${CMAKE_THREAD_LIBS_INIT} ) -add_executable(c4_demo - src/c4_demo.c -) - -target_link_libraries(c4_demo - c4_lib - ${Picoquic_LIBRARIES} - ${PTLS_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CMAKE_DL_LIBS} - ${CMAKE_THREAD_LIBS_INIT} -) - # get all project files for formatting file(GLOB_RECURSE CLANG_FORMAT_SOURCE_FILES *.c *.h) diff --git a/ci/build_picoquic.sh b/ci/build_picoquic.sh index d9d537a..8b13b54 100755 --- a/ci/build_picoquic.sh +++ b/ci/build_picoquic.sh @@ -4,6 +4,9 @@ cd .. git clone https://github.com/private-octopus/picoquic cd picoquic +git checkout +git submodule init +git submodule update cmake $CMAKE_OPTS . make -j$(nproc) all cd .. diff --git a/ci/build_picoquic_ns.sh b/ci/build_picoquic_ns.sh new file mode 100755 index 0000000..300404b --- /dev/null +++ b/ci/build_picoquic_ns.sh @@ -0,0 +1,11 @@ +#!/bin/sh +#build last picoquic master (for Travis) + +cd .. +git clone https://github.com/private-octopus/picoquic_ns +cd picoquic_ns +cmake $CMAKE_OPTS . +make -j$(nproc) all +pwd +ls +cd .. diff --git a/pico_sim_vs/pico_sim_vs.sln b/pico_sim_vs/pico_sim_vs.sln index 97ca101..e8e315b 100644 --- a/pico_sim_vs/pico_sim_vs.sln +++ b/pico_sim_vs/pico_sim_vs.sln @@ -8,11 +8,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pico_sim_vs", "pico_sim_vs. {9CBC4D21-6901-4781-91F9-1A2F00AA176E} = {9CBC4D21-6901-4781-91F9-1A2F00AA176E} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c4_demo", "c4_demo.vcxproj", "{F90A0E94-EDC2-42D2-B1B0-421C05A283BF}" - ProjectSection(ProjectDependencies) = postProject - {9CBC4D21-6901-4781-91F9-1A2F00AA176E} = {9CBC4D21-6901-4781-91F9-1A2F00AA176E} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c4_lib", "..\c4_lib\c4_lib.vcxproj", "{9CBC4D21-6901-4781-91F9-1A2F00AA176E}" EndProject Global @@ -31,14 +26,6 @@ Global {43B13A86-3049-4E22-9D58-38358E3151CA}.Release|x64.Build.0 = Release|x64 {43B13A86-3049-4E22-9D58-38358E3151CA}.Release|x86.ActiveCfg = Release|Win32 {43B13A86-3049-4E22-9D58-38358E3151CA}.Release|x86.Build.0 = Release|Win32 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Debug|x64.ActiveCfg = Debug|x64 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Debug|x64.Build.0 = Debug|x64 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Debug|x86.ActiveCfg = Debug|Win32 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Debug|x86.Build.0 = Debug|Win32 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Release|x64.ActiveCfg = Release|x64 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Release|x64.Build.0 = Release|x64 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Release|x86.ActiveCfg = Release|Win32 - {F90A0E94-EDC2-42D2-B1B0-421C05A283BF}.Release|x86.Build.0 = Release|Win32 {9CBC4D21-6901-4781-91F9-1A2F00AA176E}.Debug|x64.ActiveCfg = Debug|x64 {9CBC4D21-6901-4781-91F9-1A2F00AA176E}.Debug|x64.Build.0 = Debug|x64 {9CBC4D21-6901-4781-91F9-1A2F00AA176E}.Debug|x86.ActiveCfg = Debug|Win32