• Leigh B Stoller's avatar
    rspecs are so passe ... · 7c38809d
    Leigh B Stoller authored
    Redo the rspectogenilib converter with the goal of supporting both
    translation *and* regression testing. A new library is responsible for
    taking the output of libXML and creating a data structure representing
    the rspec. While this is being done, we look for any constructs or
    attributes we cannot handle with geni-lib and report that as an error;
    we are not going to convert an rspec unless we can do it correctly. and
    Regression testing is done with another part of this library, that knows
    how to compare each element of two rspecs. Basically start at the root
    and compare all the way down, failing if the two "parses" of the XML are
    not equal at any level.
    rspectogenilib now has an option that does regression testing by running
    the new geni-lib and comparing the resulting rspec against the original.
    On the UI side, there is a new button on existing rspec based
    profiles (currently only for admin and studs) called "Convert to
    geni-lib" that runs the converter to convert the profile to geni-lib.
    The user does not have to accept the new script of course.
    However, a converted profile is marked in the database, and the user can
    still use Jacks on it, we just run rspectogenilib geni-lib again on the
    new rspec. If the user edits the geni-lib, we switch back to normal
    geni-lib (clear the flag) when the new version is saved, and Jacks is
    once again read-only. This is explained in the UI, and is one of the
    things people need to give comment on.
    There is also a mode on the Create Profile page for converting new rspec
    based profiles to geni-lib, but that is fully turned off for now, we can
    get to that later.