aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-09 18:55:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-09 18:55:57 +0300
commit0305f819cfa249df47ba5e78d87a4a501a58da70 (patch)
tree4c71749d38f30912da94620bc68e25de9ec70ae7 /tests
parent43627fb7ede30a0f8f42657222b803c83de50b6f (diff)
Print information messages instead of warnings prior to git repository deep/dumb fetching
Diffstat (limited to 'tests')
-rw-r--r--tests/pkg-status.testscript6
-rw-r--r--tests/rep-fetch-git-commit.testscript18
-rw-r--r--tests/rep-fetch-git-refname.testscript46
-rw-r--r--tests/rep-fetch-git.testscript10
-rw-r--r--tests/rep-fetch.testscript23
5 files changed, 47 insertions, 56 deletions
diff --git a/tests/pkg-status.testscript b/tests/pkg-status.testscript
index 7e0399c..39ea85a 100644
--- a/tests/pkg-status.testscript
+++ b/tests/pkg-status.testscript
@@ -205,11 +205,7 @@ else
$clone_root_cfg;
$rep_add "$rep/libbar.git#master" && $rep_add "$rep/style.git#master";
- # Convert specific warnings to infos as we expect them to appear. This, in
- # particular, prevents bbot workers to set task result status to warning.
- #
- $rep_fetch 2>&1 | \
- sed -e 's/warning: (fetching (over|whole) .*)/info: \1/' >&2 2>!;
+ $rep_fetch 2>!;
$* style-basic >~'%style-basic available \[1\.1\.0-a\.0\..+\]%'
}
diff --git a/tests/rep-fetch-git-commit.testscript b/tests/rep-fetch-git-commit.testscript
index fd406e1..1122978 100644
--- a/tests/rep-fetch-git-commit.testscript
+++ b/tests/rep-fetch-git-commit.testscript
@@ -19,16 +19,16 @@
$clone_root_cfg && $rep_add "$rep/state0/style-basic.git#$commit";
if ($git_protocol == 'https-dumb')
- warn = "$warn_repo_hist$reason_dumb$warn_dumb"
+ info = "$info_repo_hist$reason_dumb$info_dumb"
elif ($git_protocol != 'https-smart-unadv')
- warn = "$warn_repo_hist$reason_unadv"
+ info = "$info_repo_hist$reason_unadv"
end;
$* 2>>~"%EOE%"
%fetching git:.+style-basic#$commit%
%querying .+style-basic\.git%?
%fetching from .+style-basic\.git%
- $warn
+ $info
1 package\(s\) in 1 repository\(s\)
EOE
}
@@ -39,16 +39,16 @@
$clone_root_cfg && $rep_add "$rep/state0/style-basic.git#stable@$commit";
if ($git_protocol == 'https-dumb')
- warn = "$warn_ref_hist$reason_dumb$warn_dumb"
+ info = "$info_ref_hist$reason_dumb$info_dumb"
elif ($git_protocol != 'https-smart-unadv')
- warn = "$warn_ref_hist$reason_unadv"
+ info = "$info_ref_hist$reason_unadv"
end;
$* 2>>~"%EOE%"
%fetching git:.+style-basic#stable@$commit%
%querying .+style-basic\.git%?
%fetching from .+style-basic\.git%
- $warn
+ $info
1 package\(s\) in 1 repository\(s\)
EOE
}
@@ -61,7 +61,7 @@
set commit
+if ($git_protocol == 'https-dumb')
- warn = "$warn_ref_hist$reason_dumb$warn_dumb"
+ info = "$info_ref_hist$reason_dumb$info_dumb"
end
: no-refname
@@ -74,7 +74,7 @@
%querying .+style-basic\.git%?
%fetching from .+style-basic.\git%
%querying .+style-basic\.git%?
- $warn
+ $info
1 package\(s\) in 1 repository\(s\)
EOE
}
@@ -89,7 +89,7 @@
%querying .+style-basic\.git%?
%fetching from .+style-basic\.git%
%querying .+style-basic\.git%?
- $warn
+ $info
1 package\(s\) in 1 repository\(s\)
EOE
}
diff --git a/tests/rep-fetch-git-refname.testscript b/tests/rep-fetch-git-refname.testscript
index f86cdcf..07778b2 100644
--- a/tests/rep-fetch-git-refname.testscript
+++ b/tests/rep-fetch-git-refname.testscript
@@ -8,14 +8,14 @@
$clone_root_cfg && $rep_add "$rep/state0/libfoo.git$fragment";
if ($git_protocol == 'https-dumb')
- warn = "$warn_ref_hist$reason_dumb$warn_dumb"
+ info = "$info_ref_hist$reason_dumb$info_dumb"
end;
$* 2>>~"%EOE%"
%fetching git:.+libfoo$fragment%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- $warn
+ $info
1 package\(s\) in 1 repository\(s\)
EOE
}
@@ -58,10 +58,10 @@
# Note that the commit for doc/style/basic submodule is not at the branch
# tip and so is not advertised.
#
- warn1 = '%.{0}';
- warn2 = '%.{0}';
- warn3 = '%.{0}';
- warn4 = '%.{0}';
+ info1 = '%.{0}';
+ info2 = '%.{0}';
+ info3 = '%.{0}';
+ info4 = '%.{0}';
if ($git_protocol == 'local' || \
$git_protocol == 'https-smart' || \
@@ -69,30 +69,30 @@
$git_protocol == 'git-unadv' || \
$git_protocol == 'ssh' || \
$git_protocol == 'ssh-unadv')
- warn2 = "$warn_repo_hist for submodule 'doc/style/basic'$reason_unadv"
+ info2 = "$info_repo_hist for submodule 'doc/style/basic'$reason_unadv"
elif ($git_protocol == 'https-dumb')
- warn1 = "$warn_ref_hist for submodule 'doc/style'$reason_dumb$warn_dumb"
- warn2 = "$warn_repo_hist for submodule 'doc/style/basic'$reason_dumb$warn_dumb"
- warn3 = "$warn_ref_hist for submodule 'libbar'$reason_dumb$warn_dumb"
- warn4 = "$warn_ref_hist for submodule 'libbar/extras'$reason_dumb$warn_dumb"
+ info1 = "$info_ref_hist for submodule 'doc/style'$reason_dumb$info_dumb"
+ info2 = "$info_repo_hist for submodule 'doc/style/basic'$reason_dumb$info_dumb"
+ info3 = "$info_ref_hist for submodule 'libbar'$reason_dumb$info_dumb"
+ info4 = "$info_ref_hist for submodule 'libbar/extras'$reason_dumb$info_dumb"
end;
$pkg_checkout libfoo/1.0.0 2>>~"%EOE%";
checking out libfoo/1.0.0
%querying .+style\.git%?
%fetching submodule 'doc/style' from .+style\.git%
- $warn1
+ $info1
%submodule path 'doc/style': checked out .+%
%querying .+style-basic\.git%?
%fetching submodule 'doc/style/basic' from .+style-basic\.git%
- $warn2
+ $info2
%submodule path 'doc/style/basic': checked out .+%
%querying .+libbar\.git%?
%fetching submodule 'libbar' from .+libbar\.git%
- $warn3
+ $info3
%submodule path 'libbar': checked out .+%
%fetching submodule 'libbar/extras' from .+style-basic\.git+%
- $warn4
+ $info4
%submodule path 'libbar/extras': checked out .+%
distributing libfoo/1.0.0
checked out libfoo/1.0.0
@@ -117,38 +117,38 @@
test -d $d/libbaz != 0;
if ($git_protocol == 'https-dumb')
- warn = "$warn_ref_hist$reason_dumb$warn_dumb"
+ info = "$info_ref_hist$reason_dumb$info_dumb"
end;
$* 2>>~"%EOE%" 1>&2;
%fetching git:.+libfoo$fragment%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- $warn
+ $info
%warning: unable to rmdir .?libbar.?: .+%
1 package\(s\) in 1 repository\(s\)
EOE
$pkg_drop libfoo;
- warn1 = '%.{0}';
- warn2 = '%.{0}';
+ info1 = '%.{0}';
+ info2 = '%.{0}';
if ($git_protocol == 'https-dumb')
- warn1 = "$warn_ref_hist for submodule 'doc/style'$reason_dumb$warn_dumb"
- warn2 = "$warn_ref_hist for submodule 'libbaz'$reason_dumb$warn_dumb"
+ info1 = "$info_ref_hist for submodule 'doc/style'$reason_dumb$info_dumb"
+ info2 = "$info_ref_hist for submodule 'libbaz'$reason_dumb$info_dumb"
end;
$pkg_checkout libfoo/1.0.0 2>>~"%EOE%";
checking out libfoo/1.0.0
%querying .+style\.git%?
%fetching submodule 'doc/style' from .+style\.git%
- $warn1
+ $info1
%submodule path 'doc/style': checked out .+%
%submodule path 'doc/style/basic': checked out .+%
%querying .+libbaz\.git%?
%fetching submodule 'libbaz' from .+libbaz\.git%
- $warn2
+ $info2
%submodule path 'libbaz': checked out .+%
distributing libfoo/1.0.0
checked out libfoo/1.0.0
diff --git a/tests/rep-fetch-git.testscript b/tests/rep-fetch-git.testscript
index 8b5b010..b8008ca 100644
--- a/tests/rep-fetch-git.testscript
+++ b/tests/rep-fetch-git.testscript
@@ -9,13 +9,13 @@
reason_dumb = ' (dumb HTTP)'
reason_unadv = ' (unadvertised commit)'
-warn_dumb='
-warning: no progress will be shown (dumb HTTP)'
+info_dumb='
+info: no progress will be shown (dumb HTTP)'
-warn_repo_hist = "warning: fetching whole repository history"
-warn_ref_hist = "warning: fetching whole reference history"
+info_repo_hist = "info: fetching whole repository history"
+info_ref_hist = "info: fetching whole reference history"
-warn = '%.{0}' # None.
+info = '%.{0}' # None.
test.cleanups += &cfg/.bpkg/repos/*/***
diff --git a/tests/rep-fetch.testscript b/tests/rep-fetch.testscript
index d347066..ba707c2 100644
--- a/tests/rep-fetch.testscript
+++ b/tests/rep-fetch.testscript
@@ -653,12 +653,7 @@ if ($remote != true)
$* "$rep/style.git#master" 2>! &cfg/.bpkg/repos/*/***;
- # Convert specific warnings to infos as we expect them to appear. This,
- # in particular, prevents bbot workers to set task result status to
- # warning.
- #
- $pkg_checkout "style/1.0.0" 2>&1 | \
- sed -e 's/warning: (fetching (over|whole) .*)/info: \1/' >&2 2>!;
+ $pkg_checkout "style/1.0.0" 2>!;
$rep_add $rep/style.git;
$* 2>!;
@@ -802,14 +797,14 @@ else
%fetching git:.+libfox#master%
%querying .+libfox\.git%
%fetching from .+libfox\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
%querying .+libbar\.git%?
%fetching submodule 'libbar' from .+libbar\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
%submodule path 'libbar': checked out '.+'%
%querying .+style-basic\.git%?
%fetching submodule 'libbar/extras' from .+style-basic\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
%submodule path 'libbar/extras': checked out '.+'%
2 package(s) in 1 repository(s)
EOE
@@ -883,7 +878,7 @@ else
%added .+libfoo#v\*\*%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
2 package(s) in 1 repository(s)
EOE
}
@@ -941,7 +936,7 @@ else
%added .+libfoo#9ab039761936802d61b8e591d6812a4dd4605029%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
error: unable to fetch commit 9ab039761936802d61b8e591d6812a4dd4605029
EOE
}
@@ -968,7 +963,7 @@ else
%added .+libfoo#tags/mast\*,\+master%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
1 package(s) in 1 repository(s)
EOE
}
@@ -985,7 +980,7 @@ else
%added .+libfoo%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
2 package(s) in 1 repository(s)
EOE
}
@@ -999,7 +994,7 @@ else
%added .+libfoo##-/tags/v1\*%
%querying .+libfoo\.git%
%fetching from .+libfoo\.git%
- %warning: .+%{0,2}
+ %info: .+%{0,2}
1 package(s) in 1 repository(s)
EOE
}