File: 0001-do-not-use-network-in-testsuite.patch

package info (click to toggle)
pappl 1.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,656 kB
  • sloc: ansic: 48,688; sh: 3,313; makefile: 345; objc: 240
file content (58 lines) | stat: -rw-r--r-- 2,439 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From: Thorsten Alteholz <debian@alteholz.de>
Date: Sat, 15 Jan 2022 12:43:56 +0000
Subject: do not use network in testsuite

---
 testsuite/testpappl.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/testsuite/testpappl.c b/testsuite/testpappl.c
index 2307c34..174343c 100644
--- a/testsuite/testpappl.c
+++ b/testsuite/testpappl.c
@@ -581,8 +581,8 @@ main(int  argc,				// I - Number of command-line arguments
 	        // Add all tests
 		cupsArrayAdd(testdata.names, "api");
 		cupsArrayAdd(testdata.names, "client");
-		cupsArrayAdd(testdata.names, "jpeg");
-		cupsArrayAdd(testdata.names, "png");
+		//XXX need network, do not test: cupsArrayAdd(testdata.names, "jpeg");
+		//XXX need network, do not test: cupsArrayAdd(testdata.names, "png");
 		cupsArrayAdd(testdata.names, "pwg-raster");
 	      }
 	      else if (strchr(argv[i], ','))
@@ -3334,20 +3334,20 @@ test_client(pappl_system_t *system)	// I - System
   }
 
   // PAPPL-Find-Devices
-  testBegin("client: PAPPL-Find-Devices");
-  request = ippNewRequest(IPP_OP_PAPPL_FIND_DEVICES);
-  ippAddString(request, IPP_TAG_OPERATION, IPP_CONST_TAG(IPP_TAG_URI), "system-uri", NULL, "ipp://localhost/ipp/system");
-
-  response = cupsDoRequest(http, request, "/ipp/system");
-
-  if ((attr = ippFindAttribute(response, "smi55357-device-col", IPP_TAG_BEGIN_COLLECTION)) != NULL)
-    testEndMessage(true, "%u devices found", (unsigned)ippGetCount(attr));
-  else if (cupsLastError() == IPP_STATUS_ERROR_NOT_FOUND)
-    testEndMessage(true, "no devices found");
-  else
-    testEndMessage(false, "failed: %s", cupsLastErrorString());
-
-  ippDelete(response);
+//  testBegin("client: PAPPL-Find-Devices");
+//  request = ippNewRequest(IPP_OP_PAPPL_FIND_DEVICES);
+//  ippAddString(request, IPP_TAG_OPERATION, IPP_CONST_TAG(IPP_TAG_URI), "system-uri", NULL, "ipp://localhost/ipp/system");
+//
+//  response = cupsDoRequest(http, request, "/ipp/system");
+//
+//  if ((attr = ippFindAttribute(response, "smi55357-device-col", IPP_TAG_BEGIN_COLLECTION)) != NULL)
+//    testEndMessage(true, "%u devices found", (unsigned)ippGetCount(attr));
+//  else if (cupsLastError() == IPP_STATUS_ERROR_NOT_FOUND)
+//    testEndMessage(true, "no devices found");
+//  else
+//    testEndMessage(false, "failed: %s", cupsLastErrorString());
+//
+//  ippDelete(response);
 
   // PAPPL-Find-Drivers
   testBegin("client: PAPPL-Find-Drivers");