ソースを参照

End-to-end test to get, build, and use an external library

default_compile_flags
vector-of-bool 5年前
コミット
fc98d9d859
9個のファイルの変更49行の追加0行の削除
  1. +4
    -0
      tests/deps/use-spdlog/gcc.tc.dds
  2. +2
    -0
      tests/deps/use-spdlog/msvc.tc.dds
  3. +3
    -0
      tests/deps/use-spdlog/project/library.dds
  4. +4
    -0
      tests/deps/use-spdlog/project/package.dds
  5. +1
    -0
      tests/deps/use-spdlog/project/remote.dds
  6. +6
    -0
      tests/deps/use-spdlog/project/src/spdlog_user.cpp
  7. +3
    -0
      tests/deps/use-spdlog/project/src/spdlog_user.hpp
  8. +14
    -0
      tests/deps/use-spdlog/project/src/use-spdlog.main.cpp
  9. +12
    -0
      tests/deps/use-spdlog/use_spdlog_test.py

+ 4
- 0
tests/deps/use-spdlog/gcc.tc.dds ファイルの表示

@@ -0,0 +1,4 @@
Compiler-ID: GNU
C++-Version: C++17
C++-Compiler: g++-8
Flags: -D SPDLOG_COMPILED_LIB

+ 2
- 0
tests/deps/use-spdlog/msvc.tc.dds ファイルの表示

@@ -0,0 +1,2 @@
Compiler-ID: MSVC
Flags: -D SPDLOG_COMPILED_LIB

+ 3
- 0
tests/deps/use-spdlog/project/library.dds ファイルの表示

@@ -0,0 +1,3 @@
Name: spdlog-user

Uses: spdlog/spdlog

+ 4
- 0
tests/deps/use-spdlog/project/package.dds ファイルの表示

@@ -0,0 +1,4 @@
Name: test
Version: 0.0.0

Depends: spdlog 1.4.2

+ 1
- 0
tests/deps/use-spdlog/project/remote.dds ファイルの表示

@@ -0,0 +1 @@
Remote-Package: spdlog 1.4.2; git url=https://github.com/gabime/spdlog.git ref=v1.4.2 auto=spdlog/spdlog

+ 6
- 0
tests/deps/use-spdlog/project/src/spdlog_user.cpp ファイルの表示

@@ -0,0 +1,6 @@
#include <spdlog/spdlog.h>

int write_message() {
spdlog::warn("This is a message generated by spdlog in the spdlog-user test library");
return 42;
}

+ 3
- 0
tests/deps/use-spdlog/project/src/spdlog_user.hpp ファイルの表示

@@ -0,0 +1,3 @@
#pragma once

extern int write_message();

+ 14
- 0
tests/deps/use-spdlog/project/src/use-spdlog.main.cpp ファイルの表示

@@ -0,0 +1,14 @@
#include "./spdlog_user.hpp"

#include <spdlog/spdlog.h>

int main() {
auto result = ::write_message();
if (result != 42) {
spdlog::critical(
"The test library returned the wrong value (This is a REAL dds test failure, and is "
"very unexpected)");
return 1;
}
return 0;
}

+ 12
- 0
tests/deps/use-spdlog/use_spdlog_test.py ファイルの表示

@@ -0,0 +1,12 @@
from tests import DDS

from dds_ci import proc


def test_get_build_use_spdlog(dds: DDS):
dds.deps_get()
tc_fname = 'gcc.tc.dds' if 'gcc' in dds.default_builtin_toolchain else 'msvc.tc.dds'
tc = str(dds.test_dir / tc_fname)
dds.deps_build(toolchain=tc)
dds.build(toolchain=tc, apps=True)
proc.check_run((dds.build_dir / 'use-spdlog').with_suffix(dds.exe_suffix))

読み込み中…
キャンセル
保存