Commit d6be8429 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Update .gitlab-ci.yml

parent 4ba9f240
Loading
Loading
Loading
Loading
+50 −2
Original line number Diff line number Diff line
@@ -33,13 +33,61 @@ build:ubuntu_latest:
            libyaml-cpp-dev
            libyaml-dev
            libcap2-bin
            valgrind
          
    # Build and test
    script:
        - ./bootstrap.sh
        - mkdir build && cd build
        - ../configure --enable-tests
        - ../configure 
            --enable-tests 
            CFLAGS="-fsanitize=address"
            CXXFLAGS="-fsanitize=address"
            LDFLAGS="-fsanitize=address"
            CPPFLAGS="-D__LOGGER_ENABLE_DEBUG__"
        - make -j4
        - cd tests
        - make -j4 api
        - NORNS_DEBUG_OUTPUT_TO_STDERR=1 NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api 2> /tmp/test_logs/stderr.log
        - whoami
#        - NORNS_DEBUG_OUTPUT_TO_STDERR=1 NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_namespace]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_namespace]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_local_posix_files]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_submit_copy_buffer_to_file]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_register_job]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_update_job]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_unregister_job]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_ping]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_add_process]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_remove_process]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_resource_init]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_iotask_init]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::NORNS_TASK]"
##        - valgrind 
##            --leak-check=full 
##            -v 
##            env NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 
        -    NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 
            ./api -as "[api::norns_submit]" ||
            (cat $(tail -1 tests.log)/config/urd.log && 
             ls -lr &&
             exit 1)
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::norns_status]"
#        - NORNS_DEBUG_CONFIG_FILE_OVERRIDE=1 ./api -as "[api::nornsctl_status]"

      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
+15 −0
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ test_env::test_env() :
    bool res = bfs::create_directory(m_base_dir);
    REQUIRE(res == true);

    {
        bfs::ofstream file("tests.log", std::ios_base::out | std::ios_base::trunc);
        file << m_uid << "\n";
    }

#ifndef USE_REAL_DAEMON
    const auto config_file = patch_libraries(m_base_dir);
    m_td.configure(config_file);
@@ -107,6 +112,11 @@ test_env::test_env(const fake_daemon_cfg& cfg) :
    bool res = bfs::create_directory(m_base_dir);
    REQUIRE(res == true);

    {
        bfs::ofstream file("tests.log", std::ios_base::out | std::ios_base::trunc);
        file << m_uid << "\n";
    }

#ifndef USE_REAL_DAEMON
    const auto config_file = patch_libraries(m_base_dir);
    m_td.configure(config_file, cfg);
@@ -137,6 +147,11 @@ void test_env::cleanup() {
    }

    bfs::remove_all(m_base_dir);

    if(bfs::exists("tests.log")) {
        bfs::remove("tests.log");
    }

}

test_env::~test_env() {