LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 257 - move test/Programs out of the main llvm tree
Summary: move test/Programs out of the main llvm tree
Status: RESOLVED FIXED
Alias: None
Product: Build scripts
Classification: Unclassified
Component: autoconf (show other bugs)
Version: trunk
Hardware: All All
: P normal
Assignee: Reid Spencer
URL:
Keywords: build-problem, code-cleanup
Depends on: 241
Blocks: 256
  Show dependency tree
 
Reported: 2004-02-26 15:15 PST by Alkis Evlogimenos
Modified: 2010-02-22 12:56 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alkis Evlogimenos 2004-02-26 15:15:50 PST
This will allow us to simplify the machinery for running the tests under 
test/Programs and also make build changes to the rest of the tree much more 
easily. 
 
The Programs subdirectory should be a different module in cvs which once 
dropped in under $srcdir/test, be picked up by configure, configured and 
integrated in the build process as it is today (in other words once it is 
checked out in the right place, running it should not be different than what 
it is today).
Comment 1 Chris Lattner 2004-02-26 15:22:27 PST
I mentioned this to brian, and he pointed out that test/Regression/CFrontend and
other tests that depend on the C front-end should be moved as well...

-Chris
Comment 2 Chris Lattner 2004-02-26 15:31:53 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 3 Chris Lattner 2004-02-26 15:32:06 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 4 Chris Lattner 2004-02-26 15:35:31 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 5 Chris Lattner 2004-02-26 15:36:26 PST
Changing all of these bugs who do not have people looking at them to be assigned
to "unassignedbugs", indicating that if someone is feeling ambitious, they can
take ownership of the bug.

If I stole your bug, and you still want it, feel free to take ownership back.

-Chris
Comment 6 Chris Lattner 2004-04-13 20:48:38 PDT
Here's something that I sent to John just today:

In theory, it sounds like we want
a directory layout like this:

  llvm/
       lib/...
       include/...
       test/
            Feature/
            Regression/...
       ...
       projects/
                c-frontend/
                           gcc/...
                           test/
                                C++Regression/...
                                CRegression/...
                           runtime/
                                   crtend/
                Stacker/...
                Libraries/
                          libz/
                          libpng/
                          libc/
                          ...
                TestPrograms/
                             MultiSource/...
                             SingleSource/...
                             External/...

The idea being that everything under projects is optional.  We could
rename "projects" to "modules", and be set.  I think that this would
achieve what we want (make test/Programs optional, pull stuff out of the
main CVS tree, simplify dependencies, etc).

What do you think?

-Chris
Comment 7 Reid Spencer 2004-04-13 21:33:32 PDT
The basic idea looks good, with one minor tweak that I would like to suggest.

One of the ideas behind CVS is the notion of "modules" which tyipcally
correspond to the top level directory names (although they don't have to). We
currently have one "llvm" module with everything under it. While stating that
"projects" is optional, it will still be checked out when someone does:

cvs -d :pserver:anon@llvm-cvs.cs.uiuc.edu:/var/cvs/llvm checkout .

I think the repository should be made a little flatter, structured this way:

/var/cvs/llvm/llvm - Everything you have under /llvm
/var/cvs/llvm/c-frontend - Everything you have under /llvm/Projects/c-frontend
/var/cvs/llvm/projects - Stacker, examples, etc.
/var/cvs/llvm/test - What you have under /llvm/Projects/TestPrograms

This way, one can set CVSROOT to .../var/cvs/llvm 
and get everything with:         cvs -d .../var/cvs/llvm co .
or get just the core with:       cvs -d .../var/cvs/llvm co llvm
or get just the test suite wth:  cvs -d ../var/cvs/llvm co test
or get just the projects with:   cvs -d ../var/cvs/llvm co projects

I believe this arrangement works for everyone. Developers of LLVM can just use
"cvs ... co ." which garners them everything. Users of LLVM can select which
piece they want with the appropriate co shown above.

Also with this arrangement you can go to the top of your checkout directory and
just "cvs update" to update individual portions. With the structure you
suggested, if I went to /llvm and did "cvs update", I would end up updating all
the projects and TestPrograms as well as the core and the c-frontend. This isn't
what I want most of the time. Generally, I just want the core. Occassionally I
want stacker. I never want the test programs (other than the regressions in the
core), and I'm afraid of the c-frontend :)  The alternative right now is to
visit *all* the top level directories under llvm
(lib,include,docs,autoconf,runtime,tools) and cvs update each of them. Yuck! :)

Reid.
Comment 8 Chris Lattner 2004-04-13 21:37:37 PDT
Oh yeah, I forgot to mention, that this was similar to the plan.  We already do
exactly this with the projects system, which is why I put all of the optional
stuff in the project subdir.  For example, we have an 'internal cvs' repo that
has things like the pool allocator, reoptimizer, and other misc stuff in it.  To
work on the pool allocator, I just check out that module under the projects
directory.  Since CVS is recursive, it automatically goes into that directory
and doesn't even notice that it's in a different repo.  :)

When packaging the release, the different CVS modules would go into different
tarballs/rpms/debs/whatever, and the default checkout would JUST give you LLVM.
 To get the testsuite, you would have to check out its module as well.

-Chris
Comment 9 Brian R. Gaeke 2004-08-05 14:57:33 PDT
The --enable-jit and --enable-llc_diffs options should move from the main configure
script to the test/Programs configure script, as well.
Comment 10 Reid Spencer 2004-09-05 03:14:54 PDT
The conversion has been completed. John C did the basic work of creating a new
cvs module (llvm-test) that contained the test scripts and basic autoconf
support. I polished that up and made it at least work for the nightly tester.
There may be a few other glitches that I haven't found yet, but the build of the
work is done and it works.

SOOOO .. here's what you need to know:

1. llvm/test/Programs is now "empty"

2. llvm/test/Regression and llvm/test/Feature remain, unchanged

3. to build the test suite you need to:
      cd $LLVM_SRC_ROOT/projects
      cvs co -PR llvm-test
      cd $LLVM_OBJ_ROOT/projects
      $LLVM_SRC_ROOT/configure --with-llvmsrc=$LLVM_SRC_ROOT \
        --with-llvmobj=$LLVM_OBJ_ROOT
      gmake

4. The llvm configure script will invoke the projects/llvm-test configure 
   script properly if you'd rather do that.

5. In 1.4 the source tarball for llvm won't contain the Programs test suite
   which should make it significantly smaller.

6. The NightlyTest.pl script has been modified to take the above into account.

Happy Testing.
    
Comment 11 Reid Spencer 2004-09-05 03:25:24 PDT
Reopen to assign.
Comment 12 Reid Spencer 2004-09-05 03:26:02 PDT
Re-resolve after assignment.