Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
49d30986
Commit
49d30986
authored
15 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
testcurl now uses git instead of CVS
parent
481c61d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/testcurl.1
+6
-8
6 additions, 8 deletions
tests/testcurl.1
tests/testcurl.pl
+33
-40
33 additions, 40 deletions
tests/testcurl.pl
with
39 additions
and
48 deletions
tests/testcurl.1
+
6
−
8
View file @
49d30986
...
...
@@ -20,14 +20,14 @@
.\" *
.\" **************************************************************************
.\"
.TH testcurl.pl 1 "2
0
Ma
y
200
5
" "Curl 7.
14
.1" "testcurl"
.TH testcurl.pl 1 "2
4
Ma
r
20
1
0" "Curl 7.
20
.1" "testcurl"
.SH NAME
testcurl.pl \- (automatically) test curl
.SH SYNOPSIS
.B testcurl.pl [options] [dir] > output
.SH DESCRIPTION
\fItestcurl.pl\fP is the master script to use for automatic testing of curl
off
CVS
or daily snapshots. It is written for the purpose of being run from a
off
git
or daily snapshots. It is written for the purpose of being run from a
crontab job or similar at a regular interval. The output is suitable to be
mailed to curl-autocompile@haxx.se to be dealt with automatically (make sure
the subject includes the word "autobuild" as the mail gets silently discarded
...
...
@@ -62,8 +62,8 @@ Don't run buildconf. Useful when many builds use the same source tree, as then
only one need to do this. Also, if multiple processes run tests simultaneously
on the same source tree (like several hosts on a NFS mounted dir),
simultaneous buildconf invokes may cause problems. (Added in 7.14.1)
.IP "--no
cvsup
"
Don't update from
CVS
even though it is a
CVS
tree. Useful to still be able to
.IP "--no
gitpull
"
Don't update from
git
even though it is a
git
tree. Useful to still be able to
test even though your network is down, or similar.
.IP "--runtestopts=[options]"
Options that is passed to the runtests.pl script. Useful for disabling valgrind
...
...
@@ -77,16 +77,14 @@ store the info in a 'setup' file, which it will look for on each invoke. Use
Specify your target environment. Recognized strings include 'vc', 'mingw32',
\&'borland' and 'netware'.
.SH "INITIAL SETUP"
First you make a checkout from
CVS
(or you write a script that downloads daily
First you make a checkout from
git
(or you write a script that downloads daily
snapshots automatically, find inspiration at
http://curl.haxx.se/auto/autocurl.txt):
.nf
$ mkdir daily-curl
$ cd daily-curl
$ cvs -d :pserver:anonymous@cool.haxx.se:/cvsroot/curl login
[enter return when prompted for password ]
$ cvs -d :pserver:anonymous@cool.haxx.se:/cvsroot/curl checkout curl
$ git clone git://github.com/bagder/curl.git
.fi
With the curl sources checked out, or downloaded, you can start testing right
...
...
This diff is collapsed.
Click to expand it.
tests/testcurl.pl
+
33
−
40
View file @
49d30986
...
...
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 200
9
, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 20
1
0, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
...
...
@@ -25,7 +25,8 @@
# What is This Script?
###########################
# testcurl.pl is the master script to use for automatic testing of CVS-curl.
# testcurl.pl is the master script to use for automatic testing of curl
# directly off its source repository.
# This is written for the purpose of being run from a crontab job or similar
# at a regular interval. The output is suitable to be mailed to
# curl-autocompile@haxx.se to be dealt with automatically (make sure the
...
...
@@ -45,13 +46,14 @@
# --extvercmd=[command] Command to use for displaying version with cross compiles.
# --mktarball=[command] Command to run after completed test
# --name=[name] Set name to report as
# --nocvsup Don't update from CVS even though it is a CVS tree
# --nocvsup Don't pull from git even though it is a git tree
# --nogitpull Don't pull from git even though it is a git tree
# --nobuildconf Don't run buildconf
# --runtestopts=[options] Options to pass to runtests.pl
# --setup=[file name] File name to read setup from (deprecated)
# --target=[your os] Specify your target environment.
#
# if [curl-daily-name] is omitted, a 'curl'
CVS
directory is assumed.
# if [curl-daily-name] is omitted, a 'curl'
git
directory is assumed.
#
use
strict
;
...
...
@@ -61,20 +63,22 @@ use Cwd;
# Turn on warnings (equivalent to -w, which can't be used with /usr/bin/env)
#BEGIN { $^W = 1; }
use
vars
qw($version $fixed $infixed $CURLDIR $
CVS
$pwd $build $buildlog
use
vars
qw($version $fixed $infixed $CURLDIR $
git
$pwd $build $buildlog
$buildlogname $configurebuild $targetos $confsuffix $binext
$libext)
;
use
vars
qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
$extvercmd $nocvsup $nobuildconf $crosscompile $timestamp)
;
$extvercmd $nogitpull $nobuildconf $crosscompile
$timestamp)
;
# version of this script
$version
=
'
$Revision$
';
$fixed
=
0
;
# Determine if we're running from
CVS
or a canned copy of curl,
# Determine if we're running from
git
or a canned copy of curl,
# or if we got a specific target option or setup file option.
$CURLDIR
=
"
curl
";
$
CVS
=
1
;
$
git
=
1
;
$setupfile
=
'
setup
';
while
(
$ARGV
[
0
])
{
if
(
$ARGV
[
0
]
=~
/--target=/
)
{
...
...
@@ -101,8 +105,8 @@ while ($ARGV[0]) {
elsif
(
$ARGV
[
0
]
=~
/--configure=/
)
{
$confopts
=
(
split
(
/=/
,
shift
@ARGV
))[
1
];
}
elsif
(
$ARGV
[
0
]
=~
/
--nocvsup
/
)
{
$no
cvsup
=
1
;
elsif
(
(
$ARGV
[
0
]
eq
"
--nocvsup
")
||
(
$ARGV
[
0
]
eq
"
--nogitpull
")
)
{
$no
gitpull
=
1
;
shift
@ARGV
;
}
elsif
(
$ARGV
[
0
]
=~
/--nobuildconf/
)
{
...
...
@@ -118,7 +122,7 @@ while ($ARGV[0]) {
}
else
{
$CURLDIR
=
shift
@ARGV
;
$
CVS
=
0
;
$
git
=
0
;
# a given dir, assume not using git
}
}
...
...
@@ -333,15 +337,15 @@ $str1066os = undef;
$pwd
=
getcwd
();
if
(
-
d
$CURLDIR
)
{
if
(
$
CVS
&&
-
d
"
$CURLDIR
/
CVS
")
{
logit
"
$CURLDIR
is verified to be a fine source dir
";
if
(
$
git
&&
-
d
"
$CURLDIR
/
.git
")
{
logit
"
$CURLDIR
is verified to be a fine
git
source dir
";
# remove the generated sources to force them to be re-generated each
# time we run this test
unlink
"
$CURLDIR
/src/hugehelp.c
";
}
elsif
(
!
$
CVS
&&
-
f
"
$CURLDIR
/tests/testcurl.pl
")
{
}
elsif
(
!
$
git
&&
-
f
"
$CURLDIR
/tests/testcurl.pl
")
{
logit
"
$CURLDIR
is verified to be a fine daily source dir
"
}
else
{
mydie
"
$CURLDIR
is not a daily source dir or checked out from
CVS
!
"
mydie
"
$CURLDIR
is not a daily source dir or checked out from
git
!
"
}
}
$build
=
"
build-$$
";
...
...
@@ -367,25 +371,25 @@ if (-d $build) {
# get in the curl source tree root
chdir
$CURLDIR
;
# Do the
CVS
thing, or not...
if
(
$
CVS
)
{
# Do the
git
thing, or not...
if
(
$
git
)
{
# this is a temporary fix to make things work again, remove later
logit
"
remove ares/aclocal.m4
";
unlink
"
ares/aclocal.m4
";
logit
"
update from
CVS
";
logit
"
update from
git
";
my
$cvsstat
;
sub
cvsup
()
{
# update quietly to the latest
CVS
if
(
$no
cvsup
)
{
logit
"
Skipping
CVS update (--nocvsup
)
";
sub
gitpull
()
{
# update quietly to the latest
git
if
(
$no
gitpull
)
{
logit
"
Skipping
git pull (--nogitpull
)
";
return
1
;
}
else
{
logit
"
run
cvs up
";
system
("
cvs -Q up -dP
2>&1
");
logit
"
run
git pull
";
system
("
git pull
2>&1
");
}
$cvsstat
=
$?
;
...
...
@@ -395,22 +399,11 @@ if ($CVS) {
return
!
$cvsstat
;
}
my
$att
=
0
;
while
(
!
cvsup
())
{
$att
++
;
logit
"
failed CVS update attempt number
$att
.
";
if
(
$att
>
20
)
{
$cvsstat
=
111
;
last
;
# get out of the loop
}
sleep
5
;
}
if
(
$cvsstat
!=
0
)
{
mydie
"
failed to update from
CVS
(
$cvsstat
), exiting
";
mydie
"
failed to update from
git
(
$cvsstat
), exiting
";
}
elsif
(
!
$no
cvsup
)
{
# Set timestamp to the UTC the
CVS
update took place.
elsif
(
!
$no
gitpull
)
{
# Set timestamp to the UTC the
git
update took place.
$timestamp
=
scalar
(
gmtime
)
.
"
UTC
";
}
...
...
@@ -446,14 +439,14 @@ if ($CVS) {
}
}
# Set timestamp to the one in curlver.h if this isn't a
CVS
test build.
# Set timestamp to the one in curlver.h if this isn't a
git
test build.
if
((
-
f
"
include/curl/curlver.h
")
&&
(
open
(
F
,
"
<include/curl/curlver.h
")))
{
while
(
<
F
>
)
{
chomp
;
if
(
$_
=~
/^\#define\s+LIBCURL_TIMESTAMP\s+\"(.+)\".*$/
)
{
my
$stampstring
=
$
1
;
if
(
$stampstring
!~
/
CVS
/
)
{
if
(
$stampstring
!~
/
DEV
/
)
{
$stampstring
=~
s/\s+UTC//
;
$timestamp
=
$stampstring
.
"
UTC
";
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment