← Back to team overview

mahara-contributors team mailing list archive

[Bug 897593] Re: Update .gitattributes to excluded tests from built releases

 

I've made a merge request on the scripts directory for this. See
http://gitorious.org/mahara/mahara-scripts/merge_requests/2

This change modifies the build process slightly to generate a new
.gitattributes directory and use the --worktree-attributes option to git
archive when generating the archives.

When building the .gitattributes file it only includes tests directories
(not files) containing a phpunit directory.

If a tests directory only contains a phpunit directory, the whole tests directory is excluded.
If a tests directory contains other contents, then only the phpunit tests is excluded.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/897593

Title:
  Update .gitattributes to excluded tests from built releases

Status in Mahara ePortfolio:
  In Progress

Bug description:
  When generating releases, we currently do not include our tests (e.g.
  selenium).

  It's been proposed that we allow for unit tests to be located within
  each component (e.g. /blocks/XXX/tests/) to allow for easier
  maintenance of that module.

  The files are excluded from release tarballs using a .gitattributes
  file.

  The change I'm submitting is a little heavy-handed and will prohibit
  the use of a directory or file named tests anywhere within mahara. If
  accepted, we should add a warning on push (e.g. in the Makefile) to
  remind that this directory is always excluded.

  An alternative would be to modify the release script to find all
  occurrences of tests/phpunit and place these into a new .gitattributes
  file, and then to use the --worktree-attributes option to git archive
  to ensure that specific candidates are removed. If this option is
  preferred, we should also attempt to remove empty tests directories.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/897593/+subscriptions


References