(scheme-in-list): Add a fallback to create an error tag.
[cedet.git] / tests / cit-dist.el
blobecb33a84e35a46a241a80d22e1426b1d823a0eab
1 ;;; cit-dist.el ---
2 ;;
3 ;; Copyright (C) 2009, 2010 Eric M. Ludlam
4 ;;
5 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
6 ;;
7 ;; This program is free software; you can redistribute it and/or
8 ;; modify it under the terms of the GNU General Public License as
9 ;; published by the Free Software Foundation; either version 2, or (at
10 ;; your option) any later version.
12 ;; This program is distributed in the hope that it will be useful, but
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 ;; General Public License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with this program; see the file COPYING. If not, write to
19 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 ;; Boston, MA 02110-1301, USA.
22 ;;; Commentary:
24 ;; Create a distribution, unpack it, and compile it somewhere.
26 ;;; Code:
28 (defun cit-make-dist ()
29 "Create a distribution, and test that it exists."
30 ;; 6.a) Create the distribution
31 (ede-make-dist)
32 (cit-wait-for-compilation)
33 (cit-check-compilation-for-error)
35 ;; Get the version number, then check for that file to exist.
36 (when (not (file-exists-p "CEDET_Integ_Test_Project-1.0.tar.gz"))
37 (error "Failed to create expected .tar.gz file."))
39 ;; 6.b) update the version number
40 (cit-update-version)
42 ;; 6.c) make a new dist. Verify version number.
43 (ede-make-dist)
44 (cit-wait-for-compilation)
45 (cit-check-compilation-for-error)
47 ;; Get the version number, then check for that file to exist.
48 (when (not (file-exists-p "CEDET_Integ_Test_Project-2.1.tar.gz"))
49 (error "Failed to create expected .tar.gz file."))
51 ;; @TODO - test extraction and build somewhere else.
52 ;; 6.d)
57 (defun cit-update-version ()
58 "Update the version number of the project. Verify code changes."
59 ;; 6.b) update the version number.
60 (ede-update-version "2.1")
62 ;; Check it.
63 (let ((ver (oref (ede-toplevel) :version)))
64 (when (not (string= "2.1" ver))
65 (error "Version number did not update correctly.")))
67 ;; Force a rebuild with the new version number
68 (cit-compile-and-wait " Makefile")
72 (provide 'cit-dist)
74 ;;; cit-dist.el ends here