[med-svn] [Git][med-team/concurrentqueue][master] 3 commits: Architecture: any (due to some architecture dependant cmake files

Andreas Tille (@tille) gitlab at salsa.debian.org
Wed Jul 12 13:27:10 BST 2023



Andreas Tille pushed to branch master at Debian Med / concurrentqueue


Commits:
111e9ebc by Andreas Tille at 2023-07-12T09:36:39+02:00
Architecture: any (due to some architecture dependant cmake files

- - - - -
59fbce1d by Andreas Tille at 2023-07-12T14:21:45+02:00
Base autopkgtest on upstream unittest

- - - - -
6e197aa3 by Andreas Tille at 2023-07-12T14:23:46+02:00
Upload to unstable

- - - - -


10 changed files:

- + debian/README.test
- debian/changelog
- debian/control
- + debian/docs
- debian/examples
- debian/rules
- debian/tests/run-unit-test
- − debian/tests/test1.cpp
- − debian/tests/test2.cpp
- − debian/tests/test3.cpp


Changes:

=====================================
debian/README.test
=====================================
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+    sh run-unit-test
+
+in order to confirm its integrity.


=====================================
debian/changelog
=====================================
@@ -1,10 +1,11 @@
-concurrentqueue (1.0.4+ds-1) UNRELEASED; urgency=medium
+concurrentqueue (1.0.4+ds-1) unstable; urgency=medium
 
   * Team upload.
   * New upstream version
   * Standards-Version: 4.6.2 (routine-update)
+  * Architecture: any (due to some architecture dependant cmake files
 
- -- Andreas Tille <tille at debian.org>  Tue, 04 Jul 2023 11:37:35 +0200
+ -- Andreas Tille <tille at debian.org>  Wed, 12 Jul 2023 14:22:47 +0200
 
 concurrentqueue (1.0.3+ds-1) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -12,7 +12,7 @@ Rules-Requires-Root: no
 
 Package: libconcurrentqueue-dev
 Section: libdevel
-Architecture: all
+Architecture: any
 Depends: ${misc:Depends}
 Description: industrial-strength lock-free queue for C++
  Features


=====================================
debian/docs
=====================================
@@ -0,0 +1,3 @@
+debian/tests/run-unit-test
+debian/README.test
+


=====================================
debian/examples
=====================================
@@ -1,2 +1,4 @@
-debian/tests/*.cpp
-debian/tests/run-unit-test
+tests/*.h
+tests/common
+tests/unittests
+c_api


=====================================
debian/rules
=====================================
@@ -18,5 +18,14 @@ endif
 execute_after_dh_install:
 	find debian/ -name LICENSE.md -delete
 
+execute_after_dh_installexamples:
+	sed -i \
+	    -e 's#\.\./\(.*concurrentqueue.h\)#concurrentqueue/moodycamel/\1#' \
+	    debian/*/usr/share/doc/`dh_listpackages`/examples/c_api/*.cpp
+	sed -i \
+	    -e 's#\.\./\.\./c_api#../c_api#' \
+	    -e 's#\.\./\.\./\(.*concurrentqueue.h\)#concurrentqueue/moodycamel/\1#' \
+	    debian/*/usr/share/doc/`dh_listpackages`/examples/unittests/*.cpp
+
 override_dh_auto_clean:
 	rm -f build/bin/unittests build/bin/libtbb.a build/bin/fuzztests build/bin/benchmarks fuzztests.log


=====================================
debian/tests/run-unit-test
=====================================
@@ -12,15 +12,6 @@ cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
 
 cd "${AUTOPKGTEST_TMP}"
 
-function test_output()
-{
-	echo "Test $1"
-	g++ $2 -lpthread -o test
-	./test
-	echo "PASS"
-}
-
-test_output 1 test1.cpp
-test_output 2 test2.cpp
-test_output 3 test3.cpp
-
+g++ -c -DMOODYCAMEL_STATIC -pthread  -g -O0    -fno-elide-constructors -fno-exceptions c_api/blockingconcurrentqueue.cpp c_api/concurrentqueue.cpp
+g++ -DMOODYCAMEL_STATIC -pthread  -g -O0    -fno-elide-constructors common/simplethread.cpp common/systemtime.cpp unittests/unittests.cpp blockingconcurrentqueue.o concurrentqueue.o -o unittest -lrt
+./unittest


=====================================
debian/tests/test1.cpp deleted
=====================================
@@ -1,16 +0,0 @@
-#include <iostream>
-#include <cassert>
-#include "concurrentqueue/concurrentqueue.h"
-
-int main()
-{
-	moodycamel::ConcurrentQueue<int> q;
-	for (int i = 0; i != 123; ++i)
-		q.enqueue(i);
-
-	int item;
-	for (int i = 0; i != 123; ++i) {
-		q.try_dequeue(item);
-		assert(item == i);
-	}
-}


=====================================
debian/tests/test2.cpp deleted
=====================================
@@ -1,46 +0,0 @@
-#include <iostream>
-#include <cassert>
-#include "concurrentqueue/concurrentqueue.h"
-
-int main()
-{
-	moodycamel::ConcurrentQueue<int> q;
-	int dequeued[100] = { 0 };
-	std::thread threads[20];
-
-	for (int i = 0; i != 10; ++i) {
-		threads[i] = std::thread([&](int i) {
-			for (int j = 0; j != 10; ++j) {
-				q.enqueue(i * 10 + j);
-			}
-		}, i);
-	}
-
-	// Consumers
-	for (int i = 10; i != 20; ++i) {
-		threads[i] = std::thread([&]() {
-			int item;
-			for (int j = 0; j != 20; ++j) {
-				if (q.try_dequeue(item)) {
-					++dequeued[item];
-				}
-			}
-		});
-	}
-
-	// Wait for all threads
-	for (int i = 0; i != 20; ++i) {
-		threads[i].join();
-	}
-
-	// Collect any leftovers (could be some if e.g. consumers finish before producers)
-	int item;
-	while (q.try_dequeue(item)) {
-		++dequeued[item];
-	}
-
-	// Make sure everything went in and came back out!
-	for (int i = 0; i != 100; ++i) {
-		assert(dequeued[i] == 1);
-	}
-}


=====================================
debian/tests/test3.cpp deleted
=====================================
@@ -1,50 +0,0 @@
-#include <iostream>
-#include <cassert>
-#include "concurrentqueue/concurrentqueue.h"
-
-int main()
-{
-	moodycamel::ConcurrentQueue<int> q;
-	int dequeued[100] = { 0 };
-	std::thread threads[20];
-
-	// Producers
-	for (int i = 0; i != 10; ++i) {
-		threads[i] = std::thread([&](int i) {
-			int items[10];
-			for (int j = 0; j != 10; ++j) {
-				items[j] = i * 10 + j;
-			}
-			q.enqueue_bulk(items, 10);
-		}, i);
-	}
-
-	// Consumers
-	for (int i = 10; i != 20; ++i) {
-		threads[i] = std::thread([&]() {
-			int items[20];
-			for (std::size_t count = q.try_dequeue_bulk(items, 20); count != 0; --count) {
-				++dequeued[items[count - 1]];
-			}
-		});
-	}
-
-	// Wait for all threads
-	for (int i = 0; i != 20; ++i) {
-		threads[i].join();
-	}
-
-	// Collect any leftovers (could be some if e.g. consumers finish before producers)
-	int items[10];
-	std::size_t count;
-	while ((count = q.try_dequeue_bulk(items, 10)) != 0) {
-		for (std::size_t i = 0; i != count; ++i) {
-			++dequeued[items[i]];
-		}
-	}
-
-	// Make sure everything went in and came back out!
-	for (int i = 0; i != 100; ++i) {
-		assert(dequeued[i] == 1);
-	}
-}



View it on GitLab: https://salsa.debian.org/med-team/concurrentqueue/-/compare/b34403eaec5cca63783a25658639e98692af50ad...6e197aa378fef20ca7dcbbcbebd8860c50e045ed

-- 
View it on GitLab: https://salsa.debian.org/med-team/concurrentqueue/-/compare/b34403eaec5cca63783a25658639e98692af50ad...6e197aa378fef20ca7dcbbcbebd8860c50e045ed
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230712/66992ccd/attachment-0001.htm>


More information about the debian-med-commit mailing list