You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Anurag Sharma <an...@gmail.com> on 2014/11/06 14:36:12 UTC

running smokeTestRelease.py on my local machine

Hi

I am running smokeTestRelease.py first time on my local machine in the
context of https://issues.apache.org/jira/browse/SOLR-6474 and
understanding how the smoke test can be launched using the script.

First I was running it using Python-27 and faced SyntaxError issues and got
rid of them when tried with Python 3.4.2.

Now getting error when am trying to run smoke using command below:
python -u smokeTestRelease.py
http://people.apache.org/~mikemccand/staging_area/lucene-solr-4.10.2-RC1-rev1634293

Java 1.7 JAVA_HOME=C:\Program Files\Java\jdk1.7.0_51
Traceback (most recent call last):
  File "smokeTestRelease.py", line 1522, in <module>
    main()
  File "smokeTestRelease.py", line 1465, in main
    c = parse_config()
  File "smokeTestRelease.py", line 1351, in parse_config
    c.java = make_java_config(parser, c.test_java8)
  File "smokeTestRelease.py", line 1303, in make_java_config
    run_java7 = _make_runner(java7_home, '1.7')
  File "smokeTestRelease.py", line 1294, in _make_runner
    shell=True, stderr=subprocess.STDOUT).decode('utf-8')
  File "C:\Program Files (x86)\Python34\lib\subprocess.py", line 620, in
check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command 'export JAVA_HOME="C:\Program
Files\Java\jdk1.7.0_51" PATH="C:\Program Files\Java\jdk1.7.0_51/bin:$PATH"
JAVACMD="C:\Program Files\Java\jdk1.7.0_51/bin/java"; java -version'
returned non-zero exit status 1

The only usage example I find in the code is it takes a URL param and it's
giving the above error:
    Example usage:
    python3.2 -u dev-tools/scripts/smokeTestRelease.py
http://people.apache.org/~whoever/staging_area/lucene-solr-4.3.0-RC1-rev1469340

Please suggest if I am missing anything (path/env setting) while running
through URL param in the above fashion. Also, is there a way I can run the
smoke locally without giving URL params.

Thanks
Anurag

Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
Below are two ways to use to run smoke:
1. python3 -u dev-tools/scripts/smokeTestRelease.py
http://people.apache.org/~mikemccand/staging_area/lucene-solr-4.10.2-RC1-rev1634293
2. ant nightly-smoke -Dversion=6.0.0

Change in python script is impossible as it is invoked using python command
which uses version postfix in  python command. Utilizing ant to check the
version looks better as it can check all the prerequisites before calling
the script. Further we can avoid calling using <1> and always use <2> to
run smoke.

On Sun, Nov 9, 2014 at 9:09 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 11/8/2014 9:40 PM, Anurag Sharma wrote:
> > Agree, this could be an issue with windows LFN to 8.3 SFN conversion.
> >
> > Another issue I found with my observation mentioned below, is the name
> > of python executable name used in build.xml. On windows Python
> > executable have same with different versions, python might be having
> > version specific executable names on other OS.
> >
> > Python installer for 2.7 and 3.4 version on windows installs python
> > executable with 'python.exe'.
> > Since solr expects 3.2 or higher version I installed python 3.4 version.
> > Not sure what's the executable name on linux.
> > Ant  build.xml expects the name to be python32.exe and for a workaround
> > I created copies of python.exe with python32.exe & python3.2.exe but
> > still was getting java.io.IOException: Cannot run program "python3.2".
> > It worked once I did below changes in build.xml
>
> The executable names on Linux are exactly what the ant build tries to
> use.  Here's some files in /usr/bin on an Ubuntu 14 system that I
> maintain at home:
>
> lrwxrwxrwx 1 root root       9 Dec 21  2013 python -> python2.7
> lrwxrwxrwx 1 root root       9 Dec 21  2013 python2 -> python2.7
> -rwxr-xr-x 1 root root 3349512 Mar 22  2014 python2.7
> lrwxrwxrwx 1 root root       9 May 21 21:45 python3 -> python3.4
> lrwxrwxrwx 1 root root       9 Nov  6 07:08 python3.2 -> python3.4
> -rwxr-xr-x 2 root root 4061272 Apr 11  2014 python3.4
> -rwxr-xr-x 2 root root 4061272 Apr 11  2014 python3.4m
>
> All of these existed after installing python 3.4 packages.  I created
> the python3.2 symlink myself.  On a CentOS 6 system that I also use for
> building Solr, there were no distribution packages for any 3.x python
> version, so I obtained the binary package from python.org and installed
> it in /usr/local.  I created a python3.2 symlink for that as well.  I
> haven't tried to make the python targets work on Windows.
>
> The "python3" executable should exist on every system with the minimum
> version installed, and I expect it would work with properly with the
> Lucene ant targets on any operating system.
>
> I see three ways to use "python3" and still have everything work the way
> we expect:
>
> One way is to rewrite the scripts so that any version 3 python is
> acceptable.  This might not be possible -- 3.2 is probably a strict
> minimum requirement for at least one of the scripts.
>
> Another way is to put an explicit version check into each python script
> that fails the script immediately if the version is not high enough for
> that specific script, so the ant build can fail immediately with a
> helpful message.
>
> The last way would utilize ant itself to check the python version as a
> prerequisite, sorta similar to how it fails if it does not detect a
> suitable ivy version.  If we build the small script I described in my
> last message and use it in an ant target called something like
> "-python-minimum-version" that is called before any of the targets that
> USE python, we should end up with the build failing with a helpful
> message.  This should be the least intrusive change.  I am not a skilled
> python programmer, but I could give it a try.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/9/2014 8:39 AM, Shawn Heisey wrote:
> The last way would utilize ant itself to check the python version as a
> prerequisite, sorta similar to how it fails if it does not detect a
> suitable ivy version.  If we build the small script I described in my
> last message and use it in an ant target called something like
> "-python-minimum-version" that is called before any of the targets that
> USE python, we should end up with the build failing with a helpful
> message.  This should be the least intrusive change.  I am not a skilled
> python programmer, but I could give it a try.

I came up with a script that seems to work, but when I call it in an ant
target, it doesn't stop the build.

This is the patch I've built so far:  http://apaste.info/BQo

The patch places the new target as the first dependency on
nightly-smoke, but when I run "ant nightly-smoke" with python3.2
symlinked to python2.7, this is the beginning of the output.  It runs
this new target, but the target does not fail the build:

-----------
Buildfile: /home/elyograg/asf/trunk/build.xml

clean:

clean:

clean:

-python-minimum-version:

clean:

clean:

clean:

-nightly-smoke-java8params:

nightly-smoke:
 [python32] Python 2.7.6
-----------

I figure the reason it's not working is some kind of beginner mistake,
but I haven't been able to spot it.  Anyone have any ideas?

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/8/2014 9:40 PM, Anurag Sharma wrote:
> Agree, this could be an issue with windows LFN to 8.3 SFN conversion. 
> 
> Another issue I found with my observation mentioned below, is the name
> of python executable name used in build.xml. On windows Python
> executable have same with different versions, python might be having
> version specific executable names on other OS.
> 
> Python installer for 2.7 and 3.4 version on windows installs python
> executable with 'python.exe'. 
> Since solr expects 3.2 or higher version I installed python 3.4 version.
> Not sure what's the executable name on linux.
> Ant  build.xml expects the name to be python32.exe and for a workaround
> I created copies of python.exe with python32.exe & python3.2.exe but
> still was getting java.io.IOException: Cannot run program "python3.2".
> It worked once I did below changes in build.xml

The executable names on Linux are exactly what the ant build tries to
use.  Here's some files in /usr/bin on an Ubuntu 14 system that I
maintain at home:

lrwxrwxrwx 1 root root       9 Dec 21  2013 python -> python2.7
lrwxrwxrwx 1 root root       9 Dec 21  2013 python2 -> python2.7
-rwxr-xr-x 1 root root 3349512 Mar 22  2014 python2.7
lrwxrwxrwx 1 root root       9 May 21 21:45 python3 -> python3.4
lrwxrwxrwx 1 root root       9 Nov  6 07:08 python3.2 -> python3.4
-rwxr-xr-x 2 root root 4061272 Apr 11  2014 python3.4
-rwxr-xr-x 2 root root 4061272 Apr 11  2014 python3.4m

All of these existed after installing python 3.4 packages.  I created
the python3.2 symlink myself.  On a CentOS 6 system that I also use for
building Solr, there were no distribution packages for any 3.x python
version, so I obtained the binary package from python.org and installed
it in /usr/local.  I created a python3.2 symlink for that as well.  I
haven't tried to make the python targets work on Windows.

The "python3" executable should exist on every system with the minimum
version installed, and I expect it would work with properly with the
Lucene ant targets on any operating system.

I see three ways to use "python3" and still have everything work the way
we expect:

One way is to rewrite the scripts so that any version 3 python is
acceptable.  This might not be possible -- 3.2 is probably a strict
minimum requirement for at least one of the scripts.

Another way is to put an explicit version check into each python script
that fails the script immediately if the version is not high enough for
that specific script, so the ant build can fail immediately with a
helpful message.

The last way would utilize ant itself to check the python version as a
prerequisite, sorta similar to how it fails if it does not detect a
suitable ivy version.  If we build the small script I described in my
last message and use it in an ant target called something like
"-python-minimum-version" that is called before any of the targets that
USE python, we should end up with the build failing with a helpful
message.  This should be the least intrusive change.  I am not a skilled
python programmer, but I could give it a try.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
Agree, this could be an issue with windows LFN to 8.3 SFN conversion.

Another issue I found with my observation mentioned below, is the name of
python executable name used in build.xml. On windows Python executable have
same with different versions, python might be having version
specific executable names on other OS.

Python installer for 2.7 and 3.4 version on windows installs python
executable with 'python.exe'.
Since solr expects 3.2 or higher version I installed python 3.4 version.
Not sure what's the executable name on linux.
Ant  build.xml expects the name to be python32.exe and for a workaround I
created copies of python.exe with python32.exe & python3.2.exe but still
was getting java.io.IOException: Cannot run program "python3.2". It worked
once I did below changes in build.xml

+<!--
   <property name="python32.exe" value="python3.2" />
+-->
+  <property name="python.exe" value="python" />
:
+<!--
     <exec executable="${python32.exe}" failonerror="true"
taskname="python32">
+-->
+    <exec executable="${python.exe}" failonerror="true" taskname="python">
:
+<!--
     <exec executable="${python32.exe}" failonerror="true"
taskname="smoker">
+-->
+    <exec executable="${python.exe}" failonerror="true" taskname="smoker">



On Sat, Nov 8, 2014 at 8:39 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 11/7/2014 12:19 PM, Anurag Sharma wrote:
> > I am able to proceed proceed further on changing all the instances of
> > 'python3.2' | 'python32.exe' with python and python32.exe
>
> This is a little odd.  The only thing I can think of here is that
> something in the stack (Java, ant, or maybe even Windows itself) is
> trying to treat ".2" as the filename extension in a throwback to the 8.3
> days of DOS -- and failing because not only does "python3.2" not exist
> as a full filename, but ".2" is not the extension for an executable.
>
> Windows may have long filenames, but under the covers, it still thinks
> in the old 8.3 filename structure.  in a command prompt, go to your home
> directory (C:\Users\username for most recent versions) and type "dir /x"
> to see both the long and short filenames.
>
> One fix would be to use "python3" as the executable name and somehow
> detect that it's at least version 3.2.  If the output from "python3
> --version" cannot be parsed easily by ant, perhaps a simple python
> script can be written and included that throws a nonzero exit code if an
> incompatible version is used, which hopefully can abort the build.
>
> I think that might be the easy fix.  Whether it's the right fix is
> something I have to ask those who are a lot better at wrangling ant.
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/7/2014 12:19 PM, Anurag Sharma wrote:
> I am able to proceed proceed further on changing all the instances of
> 'python3.2' | 'python32.exe' with python and python32.exe

This is a little odd.  The only thing I can think of here is that
something in the stack (Java, ant, or maybe even Windows itself) is
trying to treat ".2" as the filename extension in a throwback to the 8.3
days of DOS -- and failing because not only does "python3.2" not exist
as a full filename, but ".2" is not the extension for an executable.

Windows may have long filenames, but under the covers, it still thinks
in the old 8.3 filename structure.  in a command prompt, go to your home
directory (C:\Users\username for most recent versions) and type "dir /x"
to see both the long and short filenames.

One fix would be to use "python3" as the executable name and somehow
detect that it's at least version 3.2.  If the output from "python3
--version" cannot be parsed easily by ant, perhaps a simple python
script can be written and included that throws a nonzero exit code if an
incompatible version is used, which hopefully can abort the build.

I think that might be the easy fix.  Whether it's the right fix is
something I have to ask those who are a lot better at wrangling ant.

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
Thanks a lot Shawn for your quick responses

On Sat, Nov 8, 2014 at 12:49 AM, Anurag Sharma <an...@gmail.com> wrote:

> I am able to proceed proceed further on changing all the instances of
> 'python3.2' | 'python32.exe' with python and python32.exe
>
> On Sat, Nov 8, 2014 at 12:07 AM, Anurag Sharma <an...@gmail.com> wrote:
>
>> Getting the same error on native windows shell.
>>
>>
>> C:\work\trunk>ant foobar
>> Buildfile: C:\work\trunk\build.xml
>>
>> foobar:
>>      [echo] PATH: ${env.PATH}
>>      [echo] path: ${env.path}
>>      [echo] Path:
>> C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:
>> \Program Files\TortoiseSVN\bin;C:\Program
>> Files\Java\jdk1.7.0_51\bin;C:\Program Files\apache-ant-1.9.3\bin;C:\Program
>> Fi
>> les (x86)\Python34;C:\Program Files (x86)\Python34\Scripts
>>
>> BUILD SUCCESSFUL
>> Total time: 1 second
>>
>> C:\work\trunk>ant nightly-smoke -Dversion=6.0.0
>> Buildfile: C:\work\trunk\build.xml
>>
>> clean:
>>
>> clean:
>>
>> clean:
>>
>> -nightly-smoke-java8params:
>>
>> nightly-smoke:
>>
>> BUILD FAILED
>> C:\work\trunk\build.xml:399: Execute failed: java.io.IOException: Cannot
>> run program "python3.2": CreateProcess error=2,
>>  The system cannot find the file specified
>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
>>         at java.lang.Runtime.exec(Runtime.java:617)
>>         at
>> org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
>>         at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
>>         at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
>>         at
>> org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
>>         at
>> org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
>>         at
>> org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
>>         at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>>         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>         at org.apache.tools.ant.Task.perform(Task.java:348)
>>         at org.apache.tools.ant.Target.execute(Target.java:435)
>>         at org.apache.tools.ant.Target.performTasks(Target.java:456)
>>         at
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
>>         at
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
>>         at org.apache.tools.ant.Main.runBuild(Main.java:851)
>>         at org.apache.tools.ant.Main.startAnt(Main.java:235)
>>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
>> Caused by: java.io.IOException: CreateProcess error=2, The system cannot
>> find the file specified
>>         at java.lang.ProcessImpl.create(Native Method)
>>         at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
>>         at java.lang.ProcessImpl.start(ProcessImpl.java:136)
>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
>>         ... 23 more
>>
>> Total time: 2 seconds
>>
>> C:\work\trunk>python3.2 --version
>> Python 3.4.2
>>
>> C:\work\trunk>
>>
>> On Fri, Nov 7, 2014 at 11:54 PM, Shawn Heisey <ap...@elyograg.org>
>> wrote:
>>
>>> On 11/7/2014 11:05 AM, Anurag Sharma wrote:
>>> > $ ant foobar
>>> > Buildfile: C:\work\trunk\build.xml
>>> >
>>> > foobar:
>>> >      [echo] PATH:
>>> >
>>> C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
>>> > Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program
>>> > Files\apache-ant-1.9.3\bin;C:\Program Files (x86)\Python34;C:\Program
>>> > Files (x86)\Python34\Scripts
>>> >      [echo] path: ${env.path}
>>> >      [echo] Path: ${env.Path}
>>> >
>>> > BUILD SUCCESSFUL
>>> > Total time: 1 second
>>> >
>>> > user1@dev-pc /cygdrive/c/work/trunk
>>> > $ python3.2 --version
>>> > Python 3.4.2
>>>
>>> I just noticed you're doing this from within cygwin.  I've never tried
>>> that.  I run most things on Linux, but occasionally on Windows, but
>>> never with cygwin.
>>>
>>> Have you tried getting native windows versions of everything (ant, etc)
>>> and just running it from a native command prompt?
>>>
>>> Thanks,
>>> Shawn
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>>
>>>
>>
>

Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
I am able to proceed proceed further on changing all the instances of
'python3.2' | 'python32.exe' with python and python32.exe

On Sat, Nov 8, 2014 at 12:07 AM, Anurag Sharma <an...@gmail.com> wrote:

> Getting the same error on native windows shell.
>
>
> C:\work\trunk>ant foobar
> Buildfile: C:\work\trunk\build.xml
>
> foobar:
>      [echo] PATH: ${env.PATH}
>      [echo] path: ${env.path}
>      [echo] Path:
> C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:
> \Program Files\TortoiseSVN\bin;C:\Program
> Files\Java\jdk1.7.0_51\bin;C:\Program Files\apache-ant-1.9.3\bin;C:\Program
> Fi
> les (x86)\Python34;C:\Program Files (x86)\Python34\Scripts
>
> BUILD SUCCESSFUL
> Total time: 1 second
>
> C:\work\trunk>ant nightly-smoke -Dversion=6.0.0
> Buildfile: C:\work\trunk\build.xml
>
> clean:
>
> clean:
>
> clean:
>
> -nightly-smoke-java8params:
>
> nightly-smoke:
>
> BUILD FAILED
> C:\work\trunk\build.xml:399: Execute failed: java.io.IOException: Cannot
> run program "python3.2": CreateProcess error=2,
>  The system cannot find the file specified
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
>         at java.lang.Runtime.exec(Runtime.java:617)
>         at
> org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
>         at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
>         at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
>         at
> org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
>         at
> org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
>         at
> org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>         at org.apache.tools.ant.Task.perform(Task.java:348)
>         at org.apache.tools.ant.Target.execute(Target.java:435)
>         at org.apache.tools.ant.Target.performTasks(Target.java:456)
>         at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
>         at
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
>         at org.apache.tools.ant.Main.runBuild(Main.java:851)
>         at org.apache.tools.ant.Main.startAnt(Main.java:235)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> Caused by: java.io.IOException: CreateProcess error=2, The system cannot
> find the file specified
>         at java.lang.ProcessImpl.create(Native Method)
>         at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
>         at java.lang.ProcessImpl.start(ProcessImpl.java:136)
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
>         ... 23 more
>
> Total time: 2 seconds
>
> C:\work\trunk>python3.2 --version
> Python 3.4.2
>
> C:\work\trunk>
>
> On Fri, Nov 7, 2014 at 11:54 PM, Shawn Heisey <ap...@elyograg.org> wrote:
>
>> On 11/7/2014 11:05 AM, Anurag Sharma wrote:
>> > $ ant foobar
>> > Buildfile: C:\work\trunk\build.xml
>> >
>> > foobar:
>> >      [echo] PATH:
>> >
>> C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
>> > Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program
>> > Files\apache-ant-1.9.3\bin;C:\Program Files (x86)\Python34;C:\Program
>> > Files (x86)\Python34\Scripts
>> >      [echo] path: ${env.path}
>> >      [echo] Path: ${env.Path}
>> >
>> > BUILD SUCCESSFUL
>> > Total time: 1 second
>> >
>> > user1@dev-pc /cygdrive/c/work/trunk
>> > $ python3.2 --version
>> > Python 3.4.2
>>
>> I just noticed you're doing this from within cygwin.  I've never tried
>> that.  I run most things on Linux, but occasionally on Windows, but
>> never with cygwin.
>>
>> Have you tried getting native windows versions of everything (ant, etc)
>> and just running it from a native command prompt?
>>
>> Thanks,
>> Shawn
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>>
>

Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
Getting the same error on native windows shell.


C:\work\trunk>ant foobar
Buildfile: C:\work\trunk\build.xml

foobar:
     [echo] PATH: ${env.PATH}
     [echo] path: ${env.path}
     [echo] Path:
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:
\Program Files\TortoiseSVN\bin;C:\Program
Files\Java\jdk1.7.0_51\bin;C:\Program Files\apache-ant-1.9.3\bin;C:\Program
Fi
les (x86)\Python34;C:\Program Files (x86)\Python34\Scripts

BUILD SUCCESSFUL
Total time: 1 second

C:\work\trunk>ant nightly-smoke -Dversion=6.0.0
Buildfile: C:\work\trunk\build.xml

clean:

clean:

clean:

-nightly-smoke-java8params:

nightly-smoke:

BUILD FAILED
C:\work\trunk\build.xml:399: Execute failed: java.io.IOException: Cannot
run program "python3.2": CreateProcess error=2,
 The system cannot find the file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
        at java.lang.Runtime.exec(Runtime.java:617)
        at
org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
        at
org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.Main.runBuild(Main.java:851)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot
find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
        at java.lang.ProcessImpl.start(ProcessImpl.java:136)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
        ... 23 more

Total time: 2 seconds

C:\work\trunk>python3.2 --version
Python 3.4.2

C:\work\trunk>

On Fri, Nov 7, 2014 at 11:54 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 11/7/2014 11:05 AM, Anurag Sharma wrote:
> > $ ant foobar
> > Buildfile: C:\work\trunk\build.xml
> >
> > foobar:
> >      [echo] PATH:
> >
> C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
> > Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program
> > Files\apache-ant-1.9.3\bin;C:\Program Files (x86)\Python34;C:\Program
> > Files (x86)\Python34\Scripts
> >      [echo] path: ${env.path}
> >      [echo] Path: ${env.Path}
> >
> > BUILD SUCCESSFUL
> > Total time: 1 second
> >
> > user1@dev-pc /cygdrive/c/work/trunk
> > $ python3.2 --version
> > Python 3.4.2
>
> I just noticed you're doing this from within cygwin.  I've never tried
> that.  I run most things on Linux, but occasionally on Windows, but
> never with cygwin.
>
> Have you tried getting native windows versions of everything (ant, etc)
> and just running it from a native command prompt?
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/7/2014 11:05 AM, Anurag Sharma wrote:
> $ ant foobar
> Buildfile: C:\work\trunk\build.xml
>
> foobar:
>      [echo] PATH:
> C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
> Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program
> Files\apache-ant-1.9.3\bin;C:\Program Files (x86)\Python34;C:\Program
> Files (x86)\Python34\Scripts
>      [echo] path: ${env.path}
>      [echo] Path: ${env.Path}
>
> BUILD SUCCESSFUL
> Total time: 1 second
>
> user1@dev-pc /cygdrive/c/work/trunk
> $ python3.2 --version
> Python 3.4.2

I just noticed you're doing this from within cygwin.  I've never tried
that.  I run most things on Linux, but occasionally on Windows, but
never with cygwin.

Have you tried getting native windows versions of everything (ant, etc)
and just running it from a native command prompt?

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
$ ant foobar
Buildfile: C:\work\trunk\build.xml

foobar:
     [echo] PATH:
C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_51\bin;C:\Program
Files\apache-ant-1.9.3\bin;C:\Program Files (x86)\Python34;C:\Program Files
(x86)\Python34\Scripts
     [echo] path: ${env.path}
     [echo] Path: ${env.Path}

BUILD SUCCESSFUL
Total time: 1 second

user1@dev-pc /cygdrive/c/work/trunk
$ python3.2 --version
Python 3.4.2


On Fri, Nov 7, 2014 at 11:23 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 11/7/2014 10:16 AM, Anurag Sharma wrote:
> > I am still getting below error when running smoke on the trunk
> >
>
> <snip>
>
> > BUILD FAILED
> > C:\work\trunk\build.xml:392: Execute failed: java.io.IOException:
> > Cannot run program "python3.2": CreateProcess error=2, The system
> > cannot find the file specified
>
> <snip>
>
> > ---The file still exists
> > $ where python3.2
> > C:\Program Files (x86)\Python34\python3.2.exe
>
> That sounds like the PATH that is getting used may not include the
> location of that executable.
>
> Can you temporarily add this to the build.xml and then run "ant foobar"
> so your path variable gets output?
>
>   <target name="foobar" description="Echo the path for visibility">
>     <property environment="env"/>
>     <echo message="PATH: ${env.PATH}" />
>     <echo message="path: ${env.path}" />
>     <echo message="Path: ${env.Path}" />
>   </target>
>
> If the environment variable is correct in that output, then I have no
> idea what might be wrong.  If you open a command prompt and type
> "python3.2 --version" ... does it work and give you the version?
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/7/2014 10:16 AM, Anurag Sharma wrote:
> I am still getting below error when running smoke on the trunk 
>

<snip>

> BUILD FAILED
> C:\work\trunk\build.xml:392: Execute failed: java.io.IOException:
> Cannot run program "python3.2": CreateProcess error=2, The system
> cannot find the file specified

<snip>

> ---The file still exists
> $ where python3.2
> C:\Program Files (x86)\Python34\python3.2.exe

That sounds like the PATH that is getting used may not include the
location of that executable.

Can you temporarily add this to the build.xml and then run "ant foobar"
so your path variable gets output?

  <target name="foobar" description="Echo the path for visibility">
    <property environment="env"/>
    <echo message="PATH: ${env.PATH}" />
    <echo message="path: ${env.path}" />
    <echo message="Path: ${env.Path}" />
  </target>

If the environment variable is correct in that output, then I have no
idea what might be wrong.  If you open a command prompt and type
"python3.2 --version" ... does it work and give you the version?

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: running smokeTestRelease.py on my local machine

Posted by Anurag Sharma <an...@gmail.com>.
I am still getting below error when running smoke on the trunk

$ ant nightly-smoke -Dversion=6.0.0
Buildfile: C:\work\trunk\build.xml

clean:

clean:

clean:

-nightly-smoke-java8params:

nightly-smoke:

BUILD FAILED
C:\work\trunk\build.xml:392: Execute failed: java.io.IOException: Cannot
run program "python3.2": CreateProcess error=2, The system cannot find the
file specified
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
        at java.lang.Runtime.exec(Runtime.java:617)
        at
org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442)
        at
org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:435)
        at org.apache.tools.ant.Target.performTasks(Target.java:456)
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
        at org.apache.tools.ant.Main.runBuild(Main.java:851)
        at org.apache.tools.ant.Main.startAnt(Main.java:235)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot
find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
        at java.lang.ProcessImpl.start(ProcessImpl.java:136)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
        ... 23 more

Total time: 2 seconds


---The file still exists
$ where python3.2
C:\Program Files (x86)\Python34\python3.2.exe


On Thu, Nov 6, 2014 at 7:54 PM, Shawn Heisey <ap...@elyograg.org> wrote:

> On 11/6/2014 7:13 AM, Shawn Heisey wrote:
> > On 11/6/2014 6:36 AM, Anurag Sharma wrote:
> >> Please suggest if I am missing anything (path/env setting) while running
> >> through URL param in the above fashion. Also, is there a way I can run
> >> the smoke locally without giving URL params.
> >
> > Here is a full commandline example given by the 4.7.0 release manager
> > for that release.  I know this works, after setting the java env
> variables:
> >
> > python3.2 -u dev-tools/scripts/smokeTestRelease.py
> >
> http://people.apache.org/~simonw/staging_area/lucene-solr-4.7.0-RC1-rev1569660/
> > 1569660 4.7.0 /tmp/smoke_test_4_7
> >
> > To test the local code checkout, run a command like this, after setting
> > the requisite java environment variables:
> >
> > ant nightly-smoke -Dversion=4.10.2
>
> Followup:
>
> When running that exact command on the tags/lucene_solr_4_10_2 checkout,
> it fails.  I think there must be something in the configuration that
> still says 4.10.1:
>
> prepare-release-no-sign:
>     [mkdir] Created dir:
> /home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease
>      [copy] Copying 431 files to
> /home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease/lucene
>      [copy] Copying 239 files to
> /home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease/solr
>      [exec] JAVA7_HOME is /usr/lib/jvm/java-7-oracle
>      [exec] Traceback (most recent call last):
>      [exec]   File
>
> "/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
> line 1467, in <module>
>      [exec]     main()
>      [exec]   File
>
> "/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
> line 1308, in main
>      [exec]     smokeTest(baseURL, svnRevision, version, tmpDir,
> isSigned, testArgs)
>      [exec]   File
>
> "/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
> line 1446, in smokeTest
>      [exec]     checkSigs('lucene', lucenePath, version, tmpDir, isSigned)
>      [exec]   File
>
> "/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
> line 359, in checkSigs
>      [exec]     raise RuntimeError('%s: unknown artifact %s: expected
> prefix %s' % (project, text, expected))
>      [exec] RuntimeError: lucene: unknown artifact
> lucene-4.10.2-src.tgz: expected prefix lucene-4.10.1
>      [exec] NOTE: output encoding is UTF-8
>      [exec]
>      [exec] Load release URL
> "file:/home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease/"...
>      [exec]
>      [exec] Test Lucene...
>      [exec]   test basics...
>
> Thanks,
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/6/2014 7:13 AM, Shawn Heisey wrote:
> On 11/6/2014 6:36 AM, Anurag Sharma wrote:
>> Please suggest if I am missing anything (path/env setting) while running
>> through URL param in the above fashion. Also, is there a way I can run
>> the smoke locally without giving URL params.
> 
> Here is a full commandline example given by the 4.7.0 release manager
> for that release.  I know this works, after setting the java env variables:
> 
> python3.2 -u dev-tools/scripts/smokeTestRelease.py
> http://people.apache.org/~simonw/staging_area/lucene-solr-4.7.0-RC1-rev1569660/
> 1569660 4.7.0 /tmp/smoke_test_4_7
> 
> To test the local code checkout, run a command like this, after setting
> the requisite java environment variables:
> 
> ant nightly-smoke -Dversion=4.10.2

Followup:

When running that exact command on the tags/lucene_solr_4_10_2 checkout,
it fails.  I think there must be something in the configuration that
still says 4.10.1:

prepare-release-no-sign:
    [mkdir] Created dir:
/home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease
     [copy] Copying 431 files to
/home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease/lucene
     [copy] Copying 239 files to
/home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease/solr
     [exec] JAVA7_HOME is /usr/lib/jvm/java-7-oracle
     [exec] Traceback (most recent call last):
     [exec]   File
"/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
line 1467, in <module>
     [exec]     main()
     [exec]   File
"/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
line 1308, in main
     [exec]     smokeTest(baseURL, svnRevision, version, tmpDir,
isSigned, testArgs)
     [exec]   File
"/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
line 1446, in smokeTest
     [exec]     checkSigs('lucene', lucenePath, version, tmpDir, isSigned)
     [exec]   File
"/home/elyograg/asf/lucene_solr_4_10_2/dev-tools/scripts/smokeTestRelease.py",
line 359, in checkSigs
     [exec]     raise RuntimeError('%s: unknown artifact %s: expected
prefix %s' % (project, text, expected))
     [exec] RuntimeError: lucene: unknown artifact
lucene-4.10.2-src.tgz: expected prefix lucene-4.10.1
     [exec] NOTE: output encoding is UTF-8
     [exec]
     [exec] Load release URL
"file:/home/elyograg/asf/lucene_solr_4_10_2/lucene/build/fakeRelease/"...
     [exec]
     [exec] Test Lucene...
     [exec]   test basics...

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: running smokeTestRelease.py on my local machine

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/6/2014 6:36 AM, Anurag Sharma wrote:
> Please suggest if I am missing anything (path/env setting) while running
> through URL param in the above fashion. Also, is there a way I can run
> the smoke locally without giving URL params.

Here is a full commandline example given by the 4.7.0 release manager
for that release.  I know this works, after setting the java env variables:

python3.2 -u dev-tools/scripts/smokeTestRelease.py
http://people.apache.org/~simonw/staging_area/lucene-solr-4.7.0-RC1-rev1569660/
1569660 4.7.0 /tmp/smoke_test_4_7

To test the local code checkout, run a command like this, after setting
the requisite java environment variables:

ant nightly-smoke -Dversion=4.10.2

Thanks,
Shawn


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org