- Sep 18, 2012
-
-
Michael Hanselmann authored
File system paths moved from constants to pathutils. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 04, 2012
-
-
Iustin Pop authored
This moves the last (I think) htools-related bits out of test/ under htest/. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is the first commit of a series that will attempt to cleanup the test code organisation, which evolved somewhat organically from the initial pure htools functionality. The proposed organisation of the tree will be as follows: - htools (or maybe renamed to haskell or hs): only production code - htest: top-level test directory, containing test.hs, static helper scripts, etc. - htest/Ganeti/*.hs: modules implementing the actual test properties and test cases for the correspondingly-named production code modules - htest/data: containing test data files for the test cases This particular patch moves all the test code (test.hs, hpc-htools.hs symlink) and helper scripts (offline-test.sh, etc.) from htools/ to htest/, while updating the files themselves (if they had paths mentioning htools/), .gitignore and the Makefile. The only special mention is that in Makefile, we used to have a BINARY shell variable in binary build rule; that was computed via stripping `htools/' prefix; I've cleaned that and replaced with $(notdir $@); even though it's duplicated a few times, it leads to more readable make output (and easier to copy-paste). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Sep 03, 2012
-
-
Iustin Pop authored
This enhances convert-constants to not flatten dicts completely, but also generate a so-called association list for them. This allows either direct use of the 'lookup' function, or (for performance) conversion to Data.Map and optimised lookup later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
While looking at the hypervisor types in Constants.hs, I saw that the 'hyperTypes' list is using strings instead of names. This is due to the fact that we require the entire elements in the list to be identified (homogeneous lists), but the string "xen-pvm" is declared by both 'defaultEnabledHypervisor' and 'htXenPvm'. We can improve convert-constants by adding a list of names that we know (statically) don't declare, but instead reuse values. Unless we have an ADT parser, this is the best we can do, I think. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Aug 28, 2012
-
-
Iustin Pop authored
Since these will be needed for Haskell's implementation of query2. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Aug 23, 2012
-
-
Iustin Pop authored
Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's: - bump version in the docs - silence some new checks that are wrong due to our indent=2 instead of 4 - fix lots of errors in the code where the indentation was wrong by 1 or 2 spaces - fix a few cases of == True, False, None and replace with 'is' - re-indent some cases where the code is OK, but pep8 complains Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jul 23, 2012
-
-
Iustin Pop authored
Currently, the order of commands in the bash completion file is random, because the sub-commands are not sorted. This makes it harder to investigate the differences in packaged Ganeti or in installed Ganeti, since chunks in this file will have a random order. To fix this, we sort the subcommands based on the first subcommand in a given group ('first' also in sorted order); this results in a stable contents of file, as tested by building it many times and checking for differences. The patch also does a few other minor changes to the file (e.g. updating copyright years, etc.). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- May 22, 2012
-
-
Iustin Pop authored
Allow all errors to be displayed, instead of aborting at the first one, and don't show stacktraces anymore. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This is trivial, but should prevent such things in the future. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 07, 2012
-
-
Iustin Pop authored
This adds a bit of dumb mapping of values to names, while trying to be safe. This is the best we can do without resorting to parsing or interpreting ASTs. The difference in the output is: -- | Converted from Python list or set ADMINST_ALL adminstAll :: [String] -adminstAll = ["down", "offline", "up"] +adminstAll = [adminstDown, adminstOffline, adminstUp] Since for most such values we use strings, we don't gain in type safety on the Haskell side. But it makes the output more readable and it might open up other opportunities later. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This add support for exporting constants from multiple modules (as opposed to hard-coding constants), and also makes the output more readable by skipping things we know for sure we don't want to convert (as opposed to things we would like to but don't know _how_ to convert). Additionally, we export the constants from the luxi module too. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- May 04, 2012
-
-
Michael Hanselmann authored
Until now “TestRunIf” and “TestEnabled” could only handle AND. With this patch a new class named “Either” is added to “qa_config” and allows OR. The name “Either” was chosen instead of “Or” as the latter is very close to the reserved keyword “or”. Examples: ["rapi", Either(["instance-rename", "instance-reboot"])] Either(["node-list", "instance-list", "job-list"]) Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Apr 26, 2012
-
-
Michael Hanselmann authored
This script shows a few examples on how to use the RAPI input test client. It is also run at “make check” time to ensure it's not completely broken. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 19, 2012
-
-
Iustin Pop authored
This is a stupid/trivial patch. I didn't realise when adding htools-hpc that this will "break" tab completion on htools; as in, I will have to add / manually always when completing files on the command line. So to fix my laziness, let's rename htools-hpc to hpc-htools, eliminating this completion conflict. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 13, 2012
-
-
Iustin Pop authored
This allows the offline tests to also generate coverage data, and the hs-coverage target is changed to show both unit-test and offline-tests coverage. The downside is that now we build yet-another-binary, which makes the unit-test time slower… Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This enables the offline-test.sh run both in the special "hs-check" rule and during normal "make check". Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Mar 05, 2012
-
-
Iustin Pop authored
This moves the dashes check to a new check-man-dashes script. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Currently the check-man test is dependent on the MAN_HAS_WARNINGS test, which made sense as long as the script only did the warnings check. However, we should run the [em] tests always, and in general we could run other tests too, even if man doesn't support --warnings; so let's split the check man. As a first prerequisite, we rename check-man to check-man-warnings (and the respective Makefile variables). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Feb 27, 2012
-
-
Iustin Pop authored
This checks to see if any man output has [em] in it, as that will not be correctly show in ASCII. Unfortunately the check will depend on whether the other man check is done, but I didn't want to introduce yet another short script for this (can be done, no issue). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 13, 2012
-
-
Iustin Pop authored
This is a trivial conversion. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Unfortunately, we only support lists of simple types, and not even lists of tuples. If we actually needed those, it would be possible to implement them, with a bit more complexity in the converter. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
This prepares for tuple and other conversions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Iustin Pop authored
The two main drawbacks for convert-constants are the fact that it can't handle sets/frozensets (mainly due to the fact that I don't know how useful this would be to the Haskell code) and that it cannot export dictionaries. To fix the second case, the current patch changes the code to support flattening (potentially nested) dictionaries into single name space. Yes, this could generate conflicts, but they will be detected at compile time. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
- Jan 09, 2012
-
-
Michael Hanselmann authored
It is not necessary to run a Python script to generate the filter, which didn't work very well anyway on systems with modules in /usr/share/pyshared. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 06, 2012
-
-
Guido Trotter authored
- Always two empty lines before a version. - Standardize how version names should be called. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 05, 2012
-
-
Michael Hanselmann authored
This adds support for a callback returning name resolver options. This is required for powercycling offline nodes. While it would be possible to implement this using a separate RPC client class, doing so would require some code duplication with the standard “RpcRunner” class. The callback can generate the options based on the call arguments. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Dec 22, 2011
-
-
Bernardo Dal Seno authored
autotools/testrunner was missing in distcheck. Now some changes from 70041061 have been reverted, and testrunner is not built anymore. coverage now uses fakeroot when needed. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Bernardo Dal Seno authored
Tests ending in "-runasroot" or "-runasroot.py" are run through fakeroot, so activity that needs root privileges can be tested. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Dec 21, 2011
-
-
Iustin Pop authored
This will be used in a later patch for parameter pre-processing. For now we just add the parameter as 'None' and add a consistency check for the parameter definitions. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Nov 21, 2011
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 14, 2011
-
-
Michael Hanselmann authored
Commit b459a848 was supposed to replace all, but one was missed. Add a check to autotools/check-python-code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Andrea Spadaccini <spadaccio@google.com>
-
- Nov 08, 2011
-
-
Michael Hanselmann authored
I passed the timeout calculation function in the wrong field of the definition. A small change is also needed in “build-rpc” to not abort when writing the docstring. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 07, 2011
-
-
Michael Hanselmann authored
This avoids having to override the function in the RPC runner. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
This way the generated code no longer contains arbitrary code. Post-processing functions are used by reference. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Until now “autotools/build-rpc” would read the definition of all RPCs and write them to a new file, “lib/_generated_rpc.py” with some modifications. With this patch the generated code loads the definitions and, at module load time, gets references to the actual definitions. Further patches will even remove the calls to the post-processing functions from the generated code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
This is in preparation to reducing the amount of generated code. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Nov 02, 2011
-
-
Andrea Spadaccini authored
Signed-off-by:
Andrea Spadaccini <spadaccio@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Ensures licence and copyright headers are correct. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-