Commit 5f54d678 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Update `sync-all` and others files w.r.t. merged testsuite (re #8545)

See merge commit 66693401

This commit also adds a check for a left-over testsuite/.git folder to sync-all

This way, the first time sync-all is called after updating to a
post-testsuite-merge (see #8545) state of ghc.git, the sync-all script
aborts with an error message if a `testsuite/.git` folder is detected and
thus forces the user to take action.
Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 66693401
...@@ -32,7 +32,7 @@ Next, clone the repository and all the associated libraries: ...@@ -32,7 +32,7 @@ Next, clone the repository and all the associated libraries:
``` ```
$ git clone http://git.haskell.org/ghc.git $ git clone http://git.haskell.org/ghc.git
$ cd ghc $ cd ghc
$ ./sync-all --testsuite get $ ./sync-all get
``` ```
First copy `mk/build.mk.sample` to `mk/build.mk` and ensure it has First copy `mk/build.mk.sample` to `mk/build.mk` and ensure it has
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# - Haddock and hsc2hs are applications, built on top of GHC, # - Haddock and hsc2hs are applications, built on top of GHC,
# and in turn needed to bootstrap GHC # and in turn needed to bootstrap GHC
# - ghc-tarballs is need to build GHC # - ghc-tarballs is need to build GHC
# - nofib and testsuite are optional helpers # - nofib is an optional helpers
# #
# The format of the lines in this file is: # The format of the lines in this file is:
# localpath tag remotepath upstreamurl # localpath tag remotepath upstreamurl
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
# * The 'tag' determines when "sync-all get" will get the # * The 'tag' determines when "sync-all get" will get the
# repo. If the tag is "-" then it will always get it, but if there # repo. If the tag is "-" then it will always get it, but if there
# is a tag then a corresponding flag must be given to "sync-all", e.g. # is a tag then a corresponding flag must be given to "sync-all", e.g.
# if you want to get the packages with an "extralibs" or "testsuite" # if you want to get the packages with an "extralibs"
# tag then you need to use "sync-all --extra --testsuite get". # tag then you need to use "sync-all --extra get".
# Support for new tags must be manually added to the "sync-all" script. # Support for new tags must be manually added to the "sync-all" script.
# #
# 'tag' is also used to determine which packages the build system # 'tag' is also used to determine which packages the build system
...@@ -76,7 +76,6 @@ libraries/transformers - - http:// ...@@ -76,7 +76,6 @@ libraries/transformers - - http://
libraries/unix - packages/unix.git - libraries/unix - packages/unix.git -
libraries/Win32 - - https://github.com/haskell/win32.git libraries/Win32 - - https://github.com/haskell/win32.git
libraries/xhtml - - https://github.com/haskell/xhtml.git libraries/xhtml - - https://github.com/haskell/xhtml.git
testsuite testsuite testsuite.git -
nofib nofib nofib.git - nofib nofib nofib.git -
libraries/parallel extra packages/parallel.git - libraries/parallel extra packages/parallel.git -
libraries/stm extra packages/stm.git - libraries/stm extra packages/stm.git -
......
...@@ -639,9 +639,9 @@ get ...@@ -639,9 +639,9 @@ get
before "get" that enable extra repositories. The full list is before "get" that enable extra repositories. The full list is
given at the end of this help. For example: given at the end of this help. For example:
./sync-all --testsuite get ./sync-all --nofib get
would get the testsuite repository in addition to the usual set of would get the nofib repository in addition to the usual set of
subrepositories. subrepositories.
remote add <remote-name> remote add <remote-name>
...@@ -726,8 +726,6 @@ Flags given *after* the command are passed to git. ...@@ -726,8 +726,6 @@ Flags given *after* the command are passed to git.
--nofib also clones the nofib benchmark suite --nofib also clones the nofib benchmark suite
--testsuite also clones the ghc testsuite
--extra also clone some extra library packages --extra also clone some extra library packages
--no-dph avoids cloning the dph packages --no-dph avoids cloning the dph packages
...@@ -867,7 +865,7 @@ sub main { ...@@ -867,7 +865,7 @@ sub main {
if ($bare_flag && ! $bare_found && ! $defaultrepo) { if ($bare_flag && ! $bare_found && ! $defaultrepo) {
die "error: bare repository ghc.git not found.\n" die "error: bare repository ghc.git not found.\n"
. " Either clone a bare ghc repo first or specify the repo location. E.g.:\n" . " Either clone a bare ghc repo first or specify the repo location. E.g.:\n"
. " ./sync-all --bare [--testsuite --nofib --extra] -r http://git.haskell.org get\n" . " ./sync-all --bare [--nofib --extra] -r http://git.haskell.org get\n"
} }
elsif ($bare_found) { elsif ($bare_found) {
$bare_flag = "--bare"; $bare_flag = "--bare";
...@@ -935,6 +933,22 @@ BEGIN { ...@@ -935,6 +933,22 @@ BEGIN {
checkCurrentBranchIsMaster(); checkCurrentBranchIsMaster();
} }
$initial_working_directory = getcwd(); $initial_working_directory = getcwd();
#message "== Checking for left-over testsuite/.git folder";
if (-d "testsuite/.git") {
print <<EOF;
============================
ATTENTION!
You have a left-over testsuite/.git folder in your GHC tree!
Please backup or remove it (e.g. "rm -r testsuite/.git") before
proceeding as the testsuite Git repository is now tracked as part of
the ghc Git repository (see #8545 for more details)
============================
EOF
die "detected obsolete testsuite/.git folder"
}
} }
END { END {
......
...@@ -89,8 +89,7 @@ check_packages () { ...@@ -89,8 +89,7 @@ check_packages () {
if ! [ -d testsuite ] if ! [ -d testsuite ]
then then
echo 'You need the testsuite to validate' >&2 echo 'Could not find the testsuite for validation' >&2
echo 'Run "./sync-all --testsuite get" to get it' >&2
exit 1 exit 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment