sci-libs/mlpack: system catch

Closes: https://bugs.gentoo.org/843491
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-05-12 15:02:13 +02:00
parent c66eb0d444
commit 975334245b
2 changed files with 574 additions and 1 deletions

View File

@@ -0,0 +1,572 @@
--- a/src/mlpack/tests/main_tests/adaboost_classify_test.cpp
+++ b/src/mlpack/tests/main_tests/adaboost_classify_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/adaboost_probabilities_test.cpp
+++ b/src/mlpack/tests/main_tests/adaboost_probabilities_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/adaboost_test.cpp
+++ b/src/mlpack/tests/main_tests/adaboost_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/adaboost_train_test.cpp
+++ b/src/mlpack/tests/main_tests/adaboost_train_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/approx_kfn_test.cpp
+++ b/src/mlpack/tests/main_tests/approx_kfn_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/bayesian_linear_regression_test.cpp
+++ b/src/mlpack/tests/main_tests/bayesian_linear_regression_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/cf_test.cpp
+++ b/src/mlpack/tests/main_tests/cf_test.cpp
@@ -17,7 +17,7 @@
#include <mlpack/core/math/random.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
using namespace arma;
--- a/src/mlpack/tests/main_tests/dbscan_test.cpp
+++ b/src/mlpack/tests/main_tests/dbscan_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/decision_tree_test.cpp
+++ b/src/mlpack/tests/main_tests/decision_tree_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
using namespace data;
--- a/src/mlpack/tests/main_tests/det_test.cpp
+++ b/src/mlpack/tests/main_tests/det_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/emst_test.cpp
+++ b/src/mlpack/tests/main_tests/emst_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/fastmks_test.cpp
+++ b/src/mlpack/tests/main_tests/fastmks_test.cpp
@@ -17,7 +17,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/gmm_generate_test.cpp
+++ b/src/mlpack/tests/main_tests/gmm_generate_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/gmm_probability_test.cpp
+++ b/src/mlpack/tests/main_tests/gmm_probability_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/gmm_train_test.cpp
+++ b/src/mlpack/tests/main_tests/gmm_train_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/hmm_generate_test.cpp
+++ b/src/mlpack/tests/main_tests/hmm_generate_test.cpp
@@ -19,7 +19,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
#include "hmm_test_utils.hpp"
--- a/src/mlpack/tests/main_tests/hmm_loglik_test.cpp
+++ b/src/mlpack/tests/main_tests/hmm_loglik_test.cpp
@@ -19,7 +19,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
#include "hmm_test_utils.hpp"
--- a/src/mlpack/tests/main_tests/hmm_train_test.cpp
+++ b/src/mlpack/tests/main_tests/hmm_train_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/hmm_viterbi_test.cpp
+++ b/src/mlpack/tests/main_tests/hmm_viterbi_test.cpp
@@ -19,7 +19,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
#include "hmm_test_utils.hpp"
--- a/src/mlpack/tests/main_tests/hoeffding_tree_test.cpp
+++ b/src/mlpack/tests/main_tests/hoeffding_tree_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/image_converter_test.cpp
+++ b/src/mlpack/tests/main_tests/image_converter_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/kde_test.cpp
+++ b/src/mlpack/tests/main_tests/kde_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/kernel_pca_test.cpp
+++ b/src/mlpack/tests/main_tests/kernel_pca_test.cpp
@@ -16,7 +16,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/kfn_test.cpp
+++ b/src/mlpack/tests/main_tests/kfn_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/kmeans_test.cpp
+++ b/src/mlpack/tests/main_tests/kmeans_test.cpp
@@ -16,7 +16,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/knn_test.cpp
+++ b/src/mlpack/tests/main_tests/knn_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/krann_test.cpp
+++ b/src/mlpack/tests/main_tests/krann_test.cpp
@@ -17,7 +17,7 @@
#include <mlpack/core/util/mlpack_main.hpp>
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/linear_regression_predict_test.cpp
+++ b/src/mlpack/tests/main_tests/linear_regression_predict_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/linear_regression_test.cpp
+++ b/src/mlpack/tests/main_tests/linear_regression_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/linear_regression_train_test.cpp
+++ b/src/mlpack/tests/main_tests/linear_regression_train_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/linear_svm_test.cpp
+++ b/src/mlpack/tests/main_tests/linear_svm_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/lmnn_test.cpp
+++ b/src/mlpack/tests/main_tests/lmnn_test.cpp
@@ -19,7 +19,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/local_coordinate_coding_test.cpp
+++ b/src/mlpack/tests/main_tests/local_coordinate_coding_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/logistic_regression_test.cpp
+++ b/src/mlpack/tests/main_tests/logistic_regression_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/lsh_test.cpp
+++ b/src/mlpack/tests/main_tests/lsh_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/mean_shift_test.cpp
+++ b/src/mlpack/tests/main_tests/mean_shift_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/nbc_test.cpp
+++ b/src/mlpack/tests/main_tests/nbc_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/nca_test.cpp
+++ b/src/mlpack/tests/main_tests/nca_test.cpp
@@ -19,7 +19,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/nmf_test.cpp
+++ b/src/mlpack/tests/main_tests/nmf_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
using namespace arma;
--- a/src/mlpack/tests/main_tests/pca_test.cpp
+++ b/src/mlpack/tests/main_tests/pca_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/perceptron_test.cpp
+++ b/src/mlpack/tests/main_tests/perceptron_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/preprocess_binarize_test.cpp
+++ b/src/mlpack/tests/main_tests/preprocess_binarize_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/preprocess_imputer_test.cpp
+++ b/src/mlpack/tests/main_tests/preprocess_imputer_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/preprocess_one_hot_encode_test.cpp
+++ b/src/mlpack/tests/main_tests/preprocess_one_hot_encode_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/preprocess_scale_test.cpp
+++ b/src/mlpack/tests/main_tests/preprocess_scale_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/preprocess_split_test.cpp
+++ b/src/mlpack/tests/main_tests/preprocess_split_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/radical_test.cpp
+++ b/src/mlpack/tests/main_tests/radical_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/random_forest_test.cpp
+++ b/src/mlpack/tests/main_tests/random_forest_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/range_search_test.cpp
+++ b/src/mlpack/tests/main_tests/range_search_test.cpp
@@ -17,7 +17,7 @@
#include "range_search_utils.hpp"
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/range_search_utils.hpp
+++ b/src/mlpack/tests/main_tests/range_search_utils.hpp
@@ -15,7 +15,7 @@
#include <mlpack/methods/range_search/rs_model.hpp>
#include <mlpack/core.hpp>
#include <mlpack/core/util/mlpack_main.hpp>
-#include "../catch.hpp"
+#include "catch.hpp"
/**
* Convert a model to a string using the text_oarchive of cereal.
--- a/src/mlpack/tests/main_tests/softmax_regression_test.cpp
+++ b/src/mlpack/tests/main_tests/softmax_regression_test.cpp
@@ -18,7 +18,7 @@
#include "main_test_fixture.hpp"
#include "../test_catch_tools.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
using namespace mlpack;
--- a/src/mlpack/tests/main_tests/sparse_coding_test.cpp
+++ b/src/mlpack/tests/main_tests/sparse_coding_test.cpp
@@ -17,7 +17,7 @@
#include "main_test_fixture.hpp"
-#include "../catch.hpp"
+#include "catch.hpp"
#include "../test_catch_tools.hpp"
using namespace mlpack;

View File

@@ -102,6 +102,7 @@ PATCHES=(
"${FILESDIR}/${PN}-no-pytest-runner.patch"
"${FILESDIR}/${PN}-link-armadillo.patch"
"${FILESDIR}/${PN}-3.4.2_p20220501-no-backports.patch"
"${FILESDIR}/${PN}-3.4.2_p20220501-system-catch.patch"
)
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -112,7 +113,7 @@ src_unpack() {
}
src_prepare() {
rm src/mlpack/tests/catch.hpp
rm src/mlpack/tescatch.hpp
rm -r src/mlpack/core/std_backport || die
rm -r src/mlpack/core/cereal/{pair_associative_container,unordered_map}.hpp || die