From 966d5c14add9ec924231d69fc834be5803fc62ab Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 10 Sep 2017 23:13:14 +0100 Subject: [PATCH 1/5] Try to fix travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 095bfe0..1ffd948 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ addons: apt: packages: - - libboost-dev + - libboost-tools-dev - xsltproc - python-lxml - docbook-xsl From 79664e03cace237d6c4f75917736dd19fe1ddd24 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 10 Sep 2017 23:29:38 +0100 Subject: [PATCH 2/5] Return error if any of the python tests fail --- test/more/run-tests.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/more/run-tests.py b/test/more/run-tests.py index c91f84c..2dd1b24 100755 --- a/test/more/run-tests.py +++ b/test/more/run-tests.py @@ -51,6 +51,7 @@ def main(argv): sys.exit(1) for root, dirs, files in os.walk(os.path.join(script_directory, 'tests')): + success = True for filename in files: (base, ext) = os.path.splitext(filename) if (ext == '.xml'): @@ -61,6 +62,7 @@ def main(argv): except: # TODO: Need better error reporting here: print "Error running boostbook for " + src_path + success = False continue if (generate_gold): @@ -74,7 +76,11 @@ def main(argv): gold_text = file.read() finally: file.close() - compare_xml(src_path, doc_text, gold_text) + if not compare_xml(src_path, doc_text, gold_text): + success = False + if not success: + sys.exit(1) + def run_boostbook(parser, boostbook_xsl, file): doc = boostbook_xsl(etree.parse(file, parser)) @@ -121,6 +127,9 @@ def compare_xml(file, doc_text, gold_text): ) print print + return False + else: + return True if __name__ == "__main__": main(sys.argv[1:]) From 36f9c16af2f5c40db8ff0c0512f4144f9629ef8c Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 10 Sep 2017 23:30:33 +0100 Subject: [PATCH 3/5] Regen test results for improved ids --- test/more/tests/libs/unordered-ref.gold | 72 ++++++++++++------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/test/more/tests/libs/unordered-ref.gold b/test/more/tests/libs/unordered-ref.gold index b43156e..1436c25 100644 --- a/test/more/tests/libs/unordered-ref.gold +++ b/test/more/tests/libs/unordered-ref.gold @@ -6,26 +6,26 @@ typename Alloc = std::allocator<Value> > class unordered_set; template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_set<Value, Hash, Pred, Alloc> const&, + bool operator==(unordered_set<Value, Hash, Pred, Alloc> const&, unordered_set<Value, Hash, Pred, Alloc> const&); template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const&, + bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const&, unordered_set<Value, Hash, Pred, Alloc> const&); template<typename Value, typename Hash, typename Pred, typename Alloc> - void swap(unordered_set<Value, Hash, Pred, Alloc>&, + void swap(unordered_set<Value, Hash, Pred, Alloc>&, unordered_set<Value, Hash, Pred, Alloc>&); template<typename Value, typename Hash = boost::hash<Value>, typename Pred = std::equal_to<Value>, typename Alloc = std::allocator<Value> > class unordered_multiset; template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const&, + bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const&, unordered_multiset<Value, Hash, Pred, Alloc> const&); template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const&, + bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const&, unordered_multiset<Value, Hash, Pred, Alloc> const&); template<typename Value, typename Hash, typename Pred, typename Alloc> - void swap(unordered_multiset<Value, Hash, Pred, Alloc>&, + void swap(unordered_multiset<Value, Hash, Pred, Alloc>&, unordered_multiset<Value, Hash, Pred, Alloc>&); } Class template unordered_set3boost::unordered_set @@ -141,15 +141,15 @@ // Equality Comparisons template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_set<Value, Hash, Pred, Alloc> const&, + bool operator==(unordered_set<Value, Hash, Pred, Alloc> const&, unordered_set<Value, Hash, Pred, Alloc> const&); template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const&, + bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const&, unordered_set<Value, Hash, Pred, Alloc> const&); // swap template<typename Value, typename Hash, typename Pred, typename Alloc> - void swap(unordered_set<Value, Hash, Pred, Alloc>&, + void swap(unordered_set<Value, Hash, Pred, Alloc>&, unordered_set<Value, Hash, Pred, Alloc>&);Description Based on chapter 23 of the working draft of the C++ standard [n2960]. @@ -366,17 +366,17 @@ ?>Effects:Changes the container's maximum load factor, using z as a hint.void rehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.<anchor id="id68-bb"/><computeroutput>unordered_set</computeroutput> Equality Comparisonstemplate<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_set<Value, Hash, Pred, Alloc> const& x, + bool operator==(unordered_set<Value, Hash, Pred, Alloc> const& x, unordered_set<Value, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const& x, + bool operator!=(unordered_set<Value, Hash, Pred, Alloc> const& x, unordered_set<Value, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.<anchor id="id69-bb"/><computeroutput>unordered_set</computeroutput> swaptemplate<typename Value, typename Hash, typename Pred, typename Alloc> - void swap(unordered_set<Value, Hash, Pred, Alloc>& x, + void swap(unordered_set<Value, Hash, Pred, Alloc>& x, unordered_set<Value, Hash, Pred, Alloc>& y);Effects:x.swap(y)Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of Hash or Pred.Notes:For a discussion of the behavior when allocators aren't equal see @@ -494,15 +494,15 @@ // Equality Comparisons template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const&, + bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const&, unordered_multiset<Value, Hash, Pred, Alloc> const&); template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const&, + bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const&, unordered_multiset<Value, Hash, Pred, Alloc> const&); // swap template<typename Value, typename Hash, typename Pred, typename Alloc> - void swap(unordered_multiset<Value, Hash, Pred, Alloc>&, + void swap(unordered_multiset<Value, Hash, Pred, Alloc>&, unordered_multiset<Value, Hash, Pred, Alloc>&);Description Based on chapter 23 of the working draft of the C++ standard [n2960]. @@ -719,17 +719,17 @@ ?>Effects:Changes the container's maximum load factor, using z as a hint.void rehash(size_type n);Changes the number of buckets so that there at least n buckets, and so that the load factor is less than the maximum load factor.Invalidates iterators, and changes the order of elements. Pointers and references to elements are not invalidated.Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.<anchor id="id137-bb"/><computeroutput>unordered_multiset</computeroutput> Equality Comparisonstemplate<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const& x, + bool operator==(unordered_multiset<Value, Hash, Pred, Alloc> const& x, unordered_multiset<Value, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.template<typename Value, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const& x, + bool operator!=(unordered_multiset<Value, Hash, Pred, Alloc> const& x, unordered_multiset<Value, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.<anchor id="id138-bb"/><computeroutput>unordered_multiset</computeroutput> swaptemplate<typename Value, typename Hash, typename Pred, typename Alloc> - void swap(unordered_multiset<Value, Hash, Pred, Alloc>& x, + void swap(unordered_multiset<Value, Hash, Pred, Alloc>& x, unordered_multiset<Value, Hash, Pred, Alloc>& y);Effects:x.swap(y)Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of Hash or Pred.Notes:For a discussion of the behavior when allocators aren't equal see @@ -742,15 +742,15 @@ class unordered_map; template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator==(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, unordered_map<Key, Mapped, Hash, Pred, Alloc> const&); template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator!=(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, unordered_map<Key, Mapped, Hash, Pred, Alloc> const&); template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - void swap(unordered_map<Key, Mapped, Hash, Pred, Alloc>&, + void swap(unordered_map<Key, Mapped, Hash, Pred, Alloc>&, unordered_map<Key, Mapped, Hash, Pred, Alloc>&); template<typename Key, typename Mapped, typename Hash = boost::hash<Key>, typename Pred = std::equal_to<Key>, @@ -758,15 +758,15 @@ class unordered_multimap; template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator==(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&); template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator!=(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&); template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - void swap(unordered_multimap<Key, Mapped, Hash, Pred, Alloc>&, + void swap(unordered_multimap<Key, Mapped, Hash, Pred, Alloc>&, unordered_multimap<Key, Mapped, Hash, Pred, Alloc>&); } Class template unordered_map3boost::unordered_map @@ -887,17 +887,17 @@ // Equality Comparisons template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator==(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, unordered_map<Key, Mapped, Hash, Pred, Alloc> const&); template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator!=(unordered_map<Key, Mapped, Hash, Pred, Alloc> const&, unordered_map<Key, Mapped, Hash, Pred, Alloc> const&); // swap template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - void swap(unordered_map<Key, Mapped, Hash, Pred, Alloc>&, + void swap(unordered_map<Key, Mapped, Hash, Pred, Alloc>&, unordered_map<Key, Mapped, Hash, Pred, Alloc>&);Description Based on chapter 23 of the working draft of the C++ standard [n2960]. @@ -1124,19 +1124,19 @@ list-presentation="table" ?>Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.<anchor id="id210-bb"/><computeroutput>unordered_map</computeroutput> Equality Comparisonstemplate<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_map<Key, Mapped, Hash, Pred, Alloc> const& x, + bool operator==(unordered_map<Key, Mapped, Hash, Pred, Alloc> const& x, unordered_map<Key, Mapped, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_map<Key, Mapped, Hash, Pred, Alloc> const& x, + bool operator!=(unordered_map<Key, Mapped, Hash, Pred, Alloc> const& x, unordered_map<Key, Mapped, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.<anchor id="id211-bb"/><computeroutput>unordered_map</computeroutput> swaptemplate<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - void swap(unordered_map<Key, Mapped, Hash, Pred, Alloc>& x, + void swap(unordered_map<Key, Mapped, Hash, Pred, Alloc>& x, unordered_map<Key, Mapped, Hash, Pred, Alloc>& y);Effects:x.swap(y)Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of Hash or Pred.Notes:For a discussion of the behavior when allocators aren't equal see @@ -1256,17 +1256,17 @@ // Equality Comparisons template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator==(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&); template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, + bool operator!=(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&, unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const&); // swap template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - void swap(unordered_multimap<Key, Mapped, Hash, Pred, Alloc>&, + void swap(unordered_multimap<Key, Mapped, Hash, Pred, Alloc>&, unordered_multimap<Key, Mapped, Hash, Pred, Alloc>&);Description Based on chapter 23 of the working draft of the C++ standard [n2960]. @@ -1487,19 +1487,19 @@ list-presentation="table" ?>Throws:The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.<anchor id="id279-bb"/><computeroutput>unordered_multimap</computeroutput> Equality Comparisonstemplate<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator==(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const& x, + bool operator==(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const& x, unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.template<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - bool operator!=(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const& x, + bool operator!=(unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const& x, unordered_multimap<Key, Mapped, Hash, Pred, Alloc> const& y);Notes:This is a boost extension.Behavior is undefined if the two containers don't have equivalent equality predicates.<anchor id="id280-bb"/><computeroutput>unordered_multimap</computeroutput> swaptemplate<typename Key, typename Mapped, typename Hash, typename Pred, typename Alloc> - void swap(unordered_multimap<Key, Mapped, Hash, Pred, Alloc>& x, + void swap(unordered_multimap<Key, Mapped, Hash, Pred, Alloc>& x, unordered_multimap<Key, Mapped, Hash, Pred, Alloc>& y);Effects:x.swap(y)Throws:If the allocators are equal, doesn't throw an exception unless it is thrown by the copy constructor or copy assignment operator of Hash or Pred.Notes:For a discussion of the behavior when allocators aren't equal see From 07f3d91a95d065b687907b94b62df41f2d670986 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 10 Sep 2017 23:57:06 +0100 Subject: [PATCH 4/5] Try using pip to install lxml Probably hitting this issue: https://github.com/travis-ci/travis-ci/issues/8132 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ffd948..64970f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,12 @@ addons: packages: - libboost-tools-dev - xsltproc - - python-lxml - docbook-xsl - docbook-xml before_script: - touch Jamroot.jam + - pip install lxml script: - cd ${TRAVIS_BUILD_DIR}/test From f87d471d5cb20bda5bd9af34608f22f804ed8bf2 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 12 Oct 2017 01:37:29 +0100 Subject: [PATCH 5/5] Write out class for quickbook blurb elements --- xsl/html-base.xsl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xsl/html-base.xsl b/xsl/html-base.xsl index 022a224..610670e 100644 --- a/xsl/html-base.xsl +++ b/xsl/html-base.xsl @@ -387,6 +387,10 @@ set toc,title + + + +