From 9c34418d1bfd5d5189b6534ae904b84265bb719f Mon Sep 17 00:00:00 2001
From: Andreas Schenk <andreas_schenk@hms.harvard.edu>
Date: Thu, 7 Jun 2012 15:28:32 -0400
Subject: [PATCH] testing for rule based builder in mmcif_entity_poly_tests

---
 modules/io/tests/test_mmcif_reader.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/io/tests/test_mmcif_reader.cc b/modules/io/tests/test_mmcif_reader.cc
index e5c415f6d..37cedb333 100644
--- a/modules/io/tests/test_mmcif_reader.cc
+++ b/modules/io/tests/test_mmcif_reader.cc
@@ -399,6 +399,14 @@ BOOST_AUTO_TEST_CASE(mmcif_entity_tests)
 
 BOOST_AUTO_TEST_CASE(mmcif_entity_poly_tests)
 {
+  SetPrefixPath(getenv("OST_ROOT"));
+  String lib_path=GetSharedDataPath()+"/compounds.chemlib";
+  conop::CompoundLibPtr compound_lib=conop::CompoundLib::Load(lib_path);
+  if (!compound_lib) {
+    std::cout << "WARNING: skipping SEQRES import unit test. "
+              << "Rule-based builder is required" << std::endl;
+    return;
+  }
   conop::Conopology::Instance().SetDefaultBuilder("RBB");
   BOOST_MESSAGE("  Running mmcif_entity_poly_tests...");
   mol::ChainHandle ch;
-- 
GitLab