Uploaded image for project: 'Slider'
  1. Slider
  2. SLIDER-1039

Run slider-agent (py)tests from target directory not src directory

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Slider 0.91
    • Component/s: build
    • Labels:
      None

      Description

      I had to -1 the slider-0.90.2-incubating RC0 build because I saw a bunch of pyc files in the source archive.

      Upon investigation on how these got there, it seems like the pytests that we run for the slider-agent module are invoked inside the src/ directory.

      We should really follow the same approach that is done for the Java files:

      • Compilation from src into target (just a copy for python)
      • Invocation of tests from inside target

      This should net us two things:

      • A build does not dirty the workspace (lots of ways this is good)
      • We can remove the *.pyc entry from .gitignore

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d26e84520ceb750593557c60a4484c313d5351cc in incubator-slider's branch refs/heads/develop from Josh Elser
        [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=d26e845 ]

        SLIDER-1039 Run python tests from target directory

        We shouldn't be running any python tests from the src
        directory as this is for the clean copy of the code. This
        should be done in the target directory. Uses the maven-resources-plugin
        to copy the src and test python code into target and changes the
        configuration on the exec plugin to specify the right paths
        rooted in target.

        Also removes some duplicative configuration when building on *nixes.

        This does not address the glaring problem of slider-assembly
        reaching into slider-agent directly to access python files.

        Show
        jira-bot ASF subversion and git services added a comment - Commit d26e84520ceb750593557c60a4484c313d5351cc in incubator-slider's branch refs/heads/develop from Josh Elser [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=d26e845 ] SLIDER-1039 Run python tests from target directory We shouldn't be running any python tests from the src directory as this is for the clean copy of the code. This should be done in the target directory. Uses the maven-resources-plugin to copy the src and test python code into target and changes the configuration on the exec plugin to specify the right paths rooted in target. Also removes some duplicative configuration when building on *nixes. This does not address the glaring problem of slider-assembly reaching into slider-agent directly to access python files.
        Hide
        elserj Josh Elser added a comment -

        Verified that we don't have any more *.pyc files hanging around outside of target/.

        I don't have a windows box set up to verify that everything still works as intended, but I did try to double-check that the path updates for Windows are properly configured.

        Show
        elserj Josh Elser added a comment - Verified that we don't have any more *.pyc files hanging around outside of target/ . I don't have a windows box set up to verify that everything still works as intended, but I did try to double-check that the path updates for Windows are properly configured.
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 0992e85500239d88f77cbd76f142b1daf02d5219 in incubator-slider's branch refs/heads/develop from Steve Loughran
        [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=0992e85 ]

        Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop

        Show
        jira-bot ASF subversion and git services added a comment - Commit 0992e85500239d88f77cbd76f142b1daf02d5219 in incubator-slider's branch refs/heads/develop from Steve Loughran [ https://git-wip-us.apache.org/repos/asf?p=incubator-slider.git;h=0992e85 ] Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider into develop 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-slider: SLIDER-1042 Use the correct cluster name when fetching the description SLIDER-1041 Fix consistency for exports, enumerate all exports on HTML index. SLIDER-1040 Better formatting on the AM's web ui. SLIDER-1012 Modify server and quicklinks for Tomcat (fengyongshe) SLIDER-809 First implementation of an Apache Tomcat app-package SLIDER-1039 Run python tests from target directory

          People

          • Assignee:
            elserj Josh Elser
            Reporter:
            elserj Josh Elser
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development