Skip to content
Permalink
Browse files

Revert "tests: move all tests from `tools` to `tests`"

This reverts commit 8107e66.

We do not allow using git submodule in onnc, please move to onnc-umbrella.
  • Loading branch information...
a127a127 committed May 21, 2019
1 parent 8107e66 commit 66159f602adeba52e7155293289717c4ac424dbf
Showing with 26 additions and 42 deletions.
  1. +0 −3 .gitmodules
  2. +0 −2 CMakeLists.txt
  3. +1 −1 Makefile.am
  4. +1 −2 configure.ac
  5. +2 −2 include/onnc/IR/Module.h
  6. +0 −4 tests/CMakeLists.txt
  7. +0 −4 tests/Makefile.am
  8. 0 tests/integrationtests/CMakeLists.txt
  9. 0 tests/integrationtests/Makefile.am
  10. 0 tests/regressiontests/CMakeLists.txt
  11. 0 tests/regressiontests/Makefile.am
  12. +0 −2 third_parties/CMakeLists.txt
  13. +0 −1 third_parties/googletest
  14. +2 −0 tools/CMakeLists.txt
  15. +1 −1 tools/Makefile.am
  16. 0 {tests → tools}/unittests/.gitignore
  17. 0 {tests → tools}/unittests/AnyTest.cpp
  18. 0 {tests → tools}/unittests/BinaryTreeTest.cpp
  19. +2 −3 {tests → tools}/unittests/CMakeLists.txt
  20. 0 {tests → tools}/unittests/ComputeGraphTest.cpp
  21. 0 {tests → tools}/unittests/ComputeIRTest.cpp
  22. 0 {tests → tools}/unittests/CounterTest.cpp
  23. 0 {tests → tools}/unittests/DigraphTest.cpp
  24. +3 −3 {tests → tools}/unittests/FileHandleTest.cpp
  25. 0 {tests → tools}/unittests/GroupTest.cpp
  26. 0 {tests → tools}/unittests/JsonObjectTest.cpp
  27. 0 {tests → tools}/unittests/JsonValueTest.cpp
  28. 0 {tests → tools}/unittests/LivenessAnalysisTest.cpp
  29. +1 −1 {tests → tools}/unittests/Makefile.am
  30. 0 {tests → tools}/unittests/MemAllocTest.cpp
  31. 0 {tests → tools}/unittests/ONNXReaderTest.cpp
  32. 0 {tests → tools}/unittests/PassManagerTest.cpp
  33. 0 {tests → tools}/unittests/QuadrupleTest.cpp
  34. 0 {tests → tools}/unittests/Runtime/AbsTest.cpp
  35. 0 {tests → tools}/unittests/Runtime/CMakeLists.txt
  36. 0 {tests → tools}/unittests/Runtime/TransposeTest.cpp
  37. +8 −8 {tests → tools}/unittests/StatisticsTest.cpp
  38. 0 {tests → tools}/unittests/StorageTest.cpp
  39. 0 {tests → tools}/unittests/StringMapTest.cpp
  40. 0 {tests → tools}/unittests/StringRefTest.cpp
  41. 0 {tests → tools}/unittests/StringSwitchTest.cpp
  42. +5 −1 {tests → tools}/unittests/TensorSelTest.cpp
  43. 0 {tests → tools}/unittests/data/bvlc_alexnet/model.onnx
  44. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_0.npz
  45. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_1.npz
  46. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_2.npz
  47. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_set_0/input_0.pb
  48. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_set_0/output_0.pb
  49. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_set_1/input_0.pb
  50. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_set_1/output_0.pb
  51. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_set_2/input_0.pb
  52. BIN {tests → tools}/unittests/data/bvlc_alexnet/test_data_set_2/output_0.pb
  53. 0 {tests → tools}/unittests/data/empty.json
  54. 0 {tests → tools}/unittests/data/lenet/model.onnx
  55. 0 {tests → tools}/unittests/data/mnist/model.onnx
  56. BIN {tests → tools}/unittests/data/mnist/test_data_0.npz
  57. BIN {tests → tools}/unittests/data/mnist/test_data_1.npz
  58. BIN {tests → tools}/unittests/data/mnist/test_data_2.npz
  59. 0 {tests → tools}/unittests/data/statistics.json
  60. 0 {tests → tools}/unittests/data/target.json
  61. 0 {tests → tools}/unittests/data/test.txt
  62. +0 −4 {tests → tools}/unittests/main.cpp

This file was deleted.

@@ -124,8 +124,6 @@ add_custom_target(code_gen)
add_subdirectory(lib)
add_subdirectory(tools)
add_subdirectory(include)
add_subdirectory(tests)
add_subdirectory(third_parties)

####################
# OUTPUT
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS=-I m4

AUTOMAKE_OPTIONS = foreign

SUBDIRS = include lib tools tests
SUBDIRS = include lib tools

dist_pkgdata_DATA = README.md LICENSE.TXT

@@ -94,9 +94,8 @@ AC_CONFIG_FILES([include/onnc/Config/Platforms.def])
AC_CONFIG_FILES([include/onnc/Config/Backends.def])
AC_CONFIG_FILES([include/onnc/Config/ONNX.h])
AC_CONFIG_FILES([lib/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/unittests/Makefile])
AC_CONFIG_FILES([tools/Makefile])
AC_CONFIG_FILES([tools/unittests/Makefile])
AC_CONFIG_FILES([tools/onnc/Makefile])
AC_CONFIG_FILES([tools/readonnx/Makefile])
AC_CONFIG_FILES([tools/onnc-jit/Makefile])
@@ -187,9 +187,9 @@ class Module
/// return the number of compute graphs
unsigned getNumOfComputeGraphs() const { return m_ComputeGraphs.numOfEntries(); }

virtual ComputeOperandList& getComputeOperands() { return m_ComputeOperands; }
ComputeOperandList& getComputeOperands() { return m_ComputeOperands; }

virtual const ComputeOperandList& getComputeOperands() const { return m_ComputeOperands; }
const ComputeOperandList& getComputeOperands() const { return m_ComputeOperands; }

ComputeDefineList& getComputeDefines() { return m_ComputeDefines; }

This file was deleted.

This file was deleted.

No changes.
No changes.
No changes.
No changes.

This file was deleted.

Submodule googletest deleted from 9d4cde
@@ -1,3 +1,5 @@

add_subdirectory(unittests)
add_subdirectory(onnc)
add_subdirectory(onni)
add_subdirectory(readonnx)
@@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = foreign

SUBDIRS = onnc readonnx onnc-jit onni
SUBDIRS = unittests onnc readonnx onnc-jit onni
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,15 +1,14 @@

include_directories(${ONNC_INCLUDE_DIRS})
include_directories(${SKYPAT_INCLUDE_DIRS})
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
include_directories(${gmock_SOURCE_DIR}/include ${gmock_SOURCE_DIR})
include_directories(${PROTOBUF_INCLUDE_DIR})

add_definitions(-DTOPDIR="${onnc_SOURCE_DIR}")
add_definitions(-DBUILDDIR="${onnc_BINARY_DIR}")

if (ENABLE_UNITTEST)
add_library(libskypat_main main.cpp)
target_link_libraries(libskypat_main gmock libonnc
target_link_libraries(libskypat_main libonnc
${SKYPAT_LIBRARIES})
endif()

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -22,7 +22,7 @@ using namespace onnc;
SKYPAT_F(FileHandleTest, open_close)
{
Path path(TOPDIR);
path.append("tests").append("unittests").append("data").append("test.txt");
path.append("tools").append("unittests").append("data").append("test.txt");
FileHandle file;
ASSERT_TRUE(file.open(path, FileHandle::OpenMode(FileHandle::kReadOnly)).isGood());
ASSERT_TRUE(file.isOpen());
@@ -38,7 +38,7 @@ SKYPAT_F(FileHandleTest, open_close)
SKYPAT_F(FileHandleTest, delegate_close)
{
Path path(TOPDIR);
path.append("tests").append("unittests").append("data").append("test.txt");
path.append("tools").append("unittests").append("data").append("test.txt");

int fd = ::open(path.native().c_str(), O_RDONLY);

@@ -59,7 +59,7 @@ SKYPAT_F(FileHandleTest, delegate_close)
SKYPAT_F(FileHandleTest, fail_close)
{
Path path(TOPDIR);
path.append("tests").append("unittests").append("data").append("test.txt");
path.append("tools").append("unittests").append("data").append("test.txt");

FileHandle file;
ASSERT_TRUE(file.open(path, FileHandle::OpenMode(FileHandle::kReadOnly)).isGood());
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -24,7 +24,7 @@ if ENABLE_REGRESSION
MORE_TEST_SOURCES =
endif

ONNC_INCLUDES = -I${abs_top_srcdir}/tests/unittests \
ONNC_INCLUDES = -I${abs_top_srcdir}/tools/unittests \
@LIBONNC_INCLUDES@ @SKYPAT_INCLUDES@ @ONNX_INCLUDES@

ANDROID_CPPFLAGS=-Waddress -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreorder -Wreturn-type -Wsequence-point -Wstrict-aliasing -Wstrict-overflow=1 -Wswitch -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wvolatile-register-var -Wno-return-stack-address
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -20,7 +20,7 @@ class Tester
public:
Tester()
: m_Source(TOPDIR), m_Target("/tmp/target.json") {
m_Source.append("tests/unittests/data/empty.json");
m_Source.append("tools/unittests/data/empty.json");
copy_file(source(), target(), CopyOptions::kOverwriteIfExists);
}

@@ -105,7 +105,7 @@ SKYPAT_F(StatisticsTest, read_only)
SKYPAT_F(StatisticsTest, merge_null)
{
Path path(TOPDIR);
path.append("/tests/unittests/data/empty.json");
path.append("/tools/unittests/data/empty.json");

Statistics statistics(path, Statistics::kReadOnly);
EXPECT_TRUE(json::Group::Null().isNull());
@@ -119,7 +119,7 @@ SKYPAT_F(StatisticsTest, merge_null)
SKYPAT_F(StatisticsTest, clear_group)
{
Path path(TOPDIR);
path.append("/tests/unittests/data/statistics.json");
path.append("/tools/unittests/data/statistics.json");
Statistics statistics(path, Statistics::kReadOnly);

ASSERT_EQ(statistics.group("group1").readEntry("gkey1", 0), 10);
@@ -160,7 +160,7 @@ SKYPAT_F(StatisticsTest, read_str)
SKYPAT_F(StatisticsTest, read_file)
{
Path path(TOPDIR);
path.append("/tests/unittests/data/statistics.json");
path.append("/tools/unittests/data/statistics.json");
Statistics statistics(path, Statistics::kReadOnly);

ASSERT_TRUE(statistics.hasGroup("group1"));
@@ -199,7 +199,7 @@ SKYPAT_F(StatisticsTest, read_file)
SKYPAT_F(StatisticsTest, read_entry)
{
Path path(TOPDIR);
path.append("/tests/unittests/data/statistics.json");
path.append("/tools/unittests/data/statistics.json");
Statistics statistics(path, Statistics::kReadOnly);

int value = statistics.group("group1").readEntry("gkey1", 33);
@@ -212,7 +212,7 @@ SKYPAT_F(StatisticsTest, read_entry)
SKYPAT_F(StatisticsTest, read_entry_wrong_type)
{
Path path(TOPDIR);
path.append("/tests/unittests/data/statistics.json");
path.append("/tools/unittests/data/statistics.json");
Statistics statistics(path, Statistics::kReadOnly);

StringRef value1 = statistics.group("group1").readEntry("gkey1", "no value");
@@ -324,7 +324,7 @@ SKYPAT_F(StatisticsTest, multiple_writes)
SKYPAT_F(StatisticsTest, statistics_impl_read)
{
Path path(TOPDIR);
path.append("/tests/unittests/data/statistics.json");
path.append("/tools/unittests/data/statistics.json");
json::Reader reader;
json::Value value;
reader.parse(path, value);
@@ -409,7 +409,7 @@ SKYPAT_F(StatisticsTest, merge_object)
Statistics statistics1(str1);

Path path2(TOPDIR);
path2.append("/tests/unittests/data/statistics.json");
path2.append("/tools/unittests/data/statistics.json");
Statistics statistics2(path2, Statistics::kReadOnly);

statistics1.merge("statistics2", statistics2.group("group1"));
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -145,7 +145,7 @@ using namespace onnc;
SKYPAT_F(TensorSelTest, alexnet)
{
Path path(TOPDIR);
path.append("tests")
path.append("tools")
.append("unittests")
.append("data")
.append("bvlc_alexnet")
@@ -362,4 +362,8 @@ SKYPAT_F(TensorSelTest, alexnet)
module.print(os);
}

//ASSERT_TRUE(state.execution.empty());
//ASSERT_TRUE(state.changed);
//int run_result = pm.run(module);
//ASSERT_TRUE(EXIT_SUCCESS == run_result);
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -7,13 +7,9 @@
//===----------------------------------------------------------------------===//
#include <skypat/skypat.h>
#include <cstdlib>
#include "gtest/gtest.h"
#include "gmock/gmock.h"

int main(int argc, char* argv[])
{
::testing::GTEST_FLAG(throw_on_failure) = true;
::testing::InitGoogleMock(&argc, argv);
skypat::Test::Initialize(argc, argv);
skypat::Test::RunAll();

0 comments on commit 66159f6

Please sign in to comment.
You can’t perform that action at this time.