File: xtest-resolvehost.patch

package info (click to toggle)
octave-instrument-control 0.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 3,468 kB
  • sloc: cpp: 16,417; sh: 2,868; ansic: 886; python: 438; makefile: 342; xml: 28
file content (108 lines) | stat: -rw-r--r-- 3,307 bytes parent folder | download | duplicates (3)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Description: Do not fail when calling resolvehost in standalone system
 This is necessary when there is no network access at package build
 time.
Author: Rafael Laboissière <rafael@debian.org>
Forwarded: not-needed
Last-Update: 2023-06-03

--- octave-instrument-control-0.7.0.orig/src/tcp/__tcp_properties__.cc
+++ octave-instrument-control-0.7.0/src/tcp/__tcp_properties__.cc
@@ -95,7 +95,11 @@ Undocumented internal function.\n\
 }
 #if 0
 %!shared ip
-%! ip = resolvehost("www.octave.org", "address");
+%! try
+%!   ip = resolvehost("www.octave.org", "address");
+%! catch
+%!   warning ("Network access is neede for running the unit tests.");
+%! end_try_catch
 
 %!xtest
 %! # test get
--- octave-instrument-control-0.7.0.orig/src/tcpclient/__tcpclient_properties__.cc
+++ octave-instrument-control-0.7.0/src/tcpclient/__tcpclient_properties__.cc
@@ -166,9 +166,13 @@ Undocumented internal function.\n\
 }
 #if 0
 %!shared ip
-%! ip = resolvehost("www.octave.org", "address");
+%! try
+%!   ip = resolvehost("www.octave.org", "address");
+%! catch
+%!   warning ("Network access is neede for running the unit tests.");
+%! end_try_catch
 
-%!test
+%!xtest
 %! # test get
 %! a = tcpclient (ip, 80);
 %! assert (__tcpclient_properties__ (a,"type"), "tcpclient");
@@ -180,7 +180,7 @@ Undocumented internal function.\n\
 %! fail ("__tcpclient_properties__ (a,'invalid')", "invalid property name");
 %! clear a
 
-%!test
+%!xtest
 %! # test set
 %! a = tcpclient(ip, 80);
 %! __tcpclient_properties__ (a, 'name', "mytest");
@@ -188,7 +192,7 @@ Undocumented internal function.\n\
 %! fail ("__tcpclient_properties__ (a,'invalid', 1)", "invalid property name");
 %! clear a
 
-%!test
+%!xtest
 %! # test flush
 %! a = tcpclient(ip, 80);
 %! __tcpclient_properties__ (a, 'flush', 0);
@@ -202,7 +206,7 @@ Undocumented internal function.\n\
 
 %!error <wrong number of arguments> __tcpclient_properties__ (1)
 
-%!test
+%!xtest
 %! a = tcpclient (ip, 80);
 %! fail ("__tcpclient_properties__ (a, 'name', 'test', 0)", "wrong number of arguments");
 %! clear a
--- octave-instrument-control-0.7.0.orig/src/tcpclient/__tcpclient_read__.cc
+++ octave-instrument-control-0.7.0/src/tcpclient/__tcpclient_read__.cc
@@ -112,7 +112,7 @@ Private function t read from tcpclient i
 }
 
 #if 0
-%!test
+%!xtest
 %! addr = resolvehost ('gnu.org', 'address');
 %! a = tcpclient (addr, 80);
 %! assert (! isnull (a));
--- octave-instrument-control-0.7.0.orig/src/tcpclient/__tcpclient_write__.cc
+++ octave-instrument-control-0.7.0/src/tcpclient/__tcpclient_write__.cc
@@ -91,7 +91,7 @@ Upon successful completion, __tcpclient_
 
 %!error <Invalid call to __tcpclient_write__> __tcpclient_write__()
 
-%!test
+%!xtest
 %! addr = resolvehost ('gnu.org', 'address');
 %! a = tcpclient (addr, 80);;
 %! # call HTTP HEAD
--- octave-instrument-control-0.7.0.orig/src/tcpclient/tcpclient.cc
+++ octave-instrument-control-0.7.0/src/tcpclient/tcpclient.cc
@@ -236,14 +236,14 @@ User data\n \
 }
 
 #if 0
-%!test
+%!xtest
 %! addr = resolvehost ('gnu.org', 'address');
 %! a = tcpclient (addr, 80);
 %! assert (! isnull (a));
 %! assert (isa (a, 'octave_tcpclient'));
 %! clear a
 
-%!test
+%!xtest
 %! addr = resolvehost ('gnu.org', 'address');
 %! a = tcpclient (addr, 80, 'name', 'test', 'timeout', 2.5);
 %! assert (! isnull (a));