You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Farid Zaripov <Fa...@kyiv.vdiweb.com> on 2007/01/09 19:00:49 UTC

[PATCH] Windows build infrastructure

   Attached is a patch to the windows build infrastructure.

   Martin or Andrew: can someone apply that patch to the night build 
system to test the changes before I commit?

   ChangeLog:
   * build.wsf: New script file to build specified configuration
   * configure.wsf (configure): Check if the environment variable
   exist before removing; use MT DLL runtime instead of ST static
   runtime in ST DLL solution configurations
   * devenv_consts.js: Added new constants
   * generate.wsf: Removed unused BUILDTYPE option from usage text;
   by default don't generate projects for build and test locales;
   generate additional solution files (stdlib + examples;
   stdlib + rwtest + tests; stdlib + utils + locales;
   stdlib + utils + locale tests;
   stdlib + utils + run_examples + run_tests); use new build.wsf
   script in generated build batch file
   * makelog.wsf (makelog): Updated according to new directory structure
   * projectdef.js (InitVSObjects): Added freedte parameter, don't free
   dte object if freedte == false;
   (projectCreateVCProject): Use MT DLL runtime instead of ST static
   runtime in ST DLL solution configurations;
   (projectCreateProjectDefsFromFolder): Add name of subfolder to the
   OutDir only if shiftOutDir is true;
   (projectCreateTestLocalesDef): New function to generate project for
   perform all locale tests in one shot;
   * projects.js (CreateProjectDefs): Added generation of the 3 projects:
   .stdcxx_runexamples; .stdcxx_runtests; .stdcxx_testlocales. Now
   returns array of the sets of projects (configure, stdlib, rwtest,
   utils, examples, run_examples, tests, run_tests, locales,
   locale_tests)
   * run_locale_utils.wsf (Cleanup): New function to remove
   temporary folder
   (Exit): New function to exit from script with cleanup
   (CreateFolder): New function to create directory three
   (dump_charmap): New function to dump the charmap of a locale
   (dump_locale): On error exited script with the same non-zero
   exit status as the locale utility
   (generate_locale): Used Exit function
   (test_locale): Called dump_charmap to produce the charmap source
   from the locale database at each of the three stages. Used this
   charmap source to create a locale in each subsequent stage.
   Placed the files created at each stage in separate directories
   named stage.1 through stage.3.
   (run_locale_utils): Avoided deleting stage directories when
   the -n option is set
   * runall.wsf: Parameter INOUTDIR now is optional; removed unused
   parameter COPYRWTESTDLL;
   (readOutFile): check manual and tutorial subfolders when searching
   example requested output file;
   (runWithChecks, runNoChecks): Removed as unused;
   (runAllExamples): Rewritten to use exec utility in packet mode.
   * summary.js (saveBuildInfoTable): encode symbols in example output
   before saving them to HTML file
   (readBuildLog): Added temporary loop to check the run-time error
   "runall.wsf(59, 6) Microsoft JScript runtime error: Permission denied"

Farid.

Re: [PATCH] Windows build infrastructure

Posted by Andrew Black <ab...@roguewave.com>.
Andrew Black wrote:
> The final tactic that could be taken is to manually build the archive, 
> applying the patch prior to creating the archive and posting it to the 
> automated build system.  I will do this prior to going to lunch, but the 
> next time the archive is rebuilt after a changes, this patch will be 
> removed from the archive.

Greetings Farid.

A quick followup.  I loaded the patched archive into the build system, 
and I received the following output (or similar) in all the completed 
windows builds:

### Building solution / Creating HTML log
D:\bman5\builds\33293198\source-buildspace\etc\config\windows\makelog.wsf(251, 
10) Microsoft JScript compilation error: Expected ')'

Additionally, I received the following output when applying your patch 
(on Unix).

> [ablack@quandry windows]$ patch < /build/ablack/windows.patch 
> patching file build.wsf
> patching file configure.wsf
> patching file devenv_consts.js
> patching file generate.wsf
> patching file makelog.wsf
> patching file projectdef.js
> patching file projects.js
> patching file run_locale_utils.wsf
> patching file runall.wsf
> Hunk #4 FAILED at 62.
> 1 out of 14 hunks FAILED -- saving rejects to file runall.wsf.rej
> patching file summary.js

--Andrew Black

Re: [PATCH] Windows build infrastructure

Posted by Andrew Black <ab...@roguewave.com>.
Greetings Farid.

I took a glance at the results from the builds when they ran and 
summarized them in 
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200701.mbox/browser

I'm not certain, but the patch you provided might have been stale. 
There is a minor bug in the result export script that strips out builds 
without a config.h/config.log from the table, so even if you had looked, 
I believe you wouldn't have seen the results.

--Andrew Black

Farid Zaripov wrote:
>> -----Original Message-----
>> From: Andrew Black [mailto:ablack@roguewave.com] 
>> Sent: Tuesday, January 09, 2007 8:35 PM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Re: [PATCH] Windows build infrastructure
>>
[snip]
> 
>   Unfortunately, I haven't seen the build logs from scripts with applied
> patch
> at Martin page (http://people.apache.org/~sebor/stdcxx/results/).
> So I commited the changes. I hope there no fatal errors (I have tested
> on
> my workstation with MSVC 7.1 and MSVC 8.0 and found no problems).

Re: [PATCH] Windows build infrastructure

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
[...]
>   Unfortunately, I haven't seen the build logs from scripts with applied
> patch
> at Martin page (http://people.apache.org/~sebor/stdcxx/results/).
> So I commited the changes. I hope there no fatal errors (I have tested
> on
> my workstation with MSVC 7.1 and MSVC 8.0 and found no problems).
> 
>   Main changes:
> - disabled parallel builds in MSVC 8;
> - build log contain the all command lines (compiler, linker, ...);
> - examples, tests and locale tests performed with using batch mode of
> the exec utility;
> - build process performed by following algorithm:

Excellent! Let's all keep a close eye on the results for the next
few days in case there are problems.

Martin

> 
>   build .configure
>   if failed goto end
>   build .stdlib
>   if failed goto end
>   build examples
>   build .rwtest
>   build exec
>   build utils (locale and localedef)
>   if exec build failed goto end
>   run examples
>   if rwtest build failed goto end
>   run tests
>   if utils build failed goto end
>   run locale tests
> end:
>   
> 
> Farid.


RE: [PATCH] Windows build infrastructure

Posted by Farid Zaripov <Fa...@kyiv.vdiweb.com>.
> -----Original Message-----
> From: Andrew Black [mailto:ablack@roguewave.com] 
> Sent: Tuesday, January 09, 2007 8:35 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: [PATCH] Windows build infrastructure
> 
> The nightly testing infrastructure is primarily my domain.  
> The mechanics of the system are such that a copy of the 
> source tree is synced down from version control, and bundled 
> into an archive.  This archive is then retrieved by a build 
> server, and built using a glue script which is provided with 
> instructions on what to build using a build specification file.

  Unfortunately, I haven't seen the build logs from scripts with applied
patch
at Martin page (http://people.apache.org/~sebor/stdcxx/results/).
So I commited the changes. I hope there no fatal errors (I have tested
on
my workstation with MSVC 7.1 and MSVC 8.0 and found no problems).

  Main changes:
- disabled parallel builds in MSVC 8;
- build log contain the all command lines (compiler, linker, ...);
- examples, tests and locale tests performed with using batch mode of
the exec utility;
- build process performed by following algorithm:

  build .configure
  if failed goto end
  build .stdlib
  if failed goto end
  build examples
  build .rwtest
  build exec
  build utils (locale and localedef)
  if exec build failed goto end
  run examples
  if rwtest build failed goto end
  run tests
  if utils build failed goto end
  run locale tests
end:
  

Farid.

Re: [PATCH] Windows build infrastructure

Posted by Andrew Black <ab...@roguewave.com>.
Greetings Farid.

The nightly testing infrastructure is primarily my domain.  The 
mechanics of the system are such that a copy of the source tree is 
synced down from version control, and bundled into an archive.  This 
archive is then retrieved by a build server, and built using a glue 
script which is provided with instructions on what to build using a 
build specification file.

The design of the infrastructure makes it difficult to inject a patch 
into the source tree, prior to the archive being created.  It might be 
possible to apply the patch to the expanded archive prior to the start 
of the build process, but the presence of the patch utility on the build 
servers can't be assumed.

A different tactic that could have been taken would be to include the 
patched files as part of the files pulled from the local version control 
system (perforce), but the local repository is retrieved prior to the 
retrieval from subversion.  I believe this would result in the files 
from subversion overwriting those from perforce.

The final tactic that could be taken is to manually build the archive, 
applying the patch prior to creating the archive and posting it to the 
automated build system.  I will do this prior to going to lunch, but the 
next time the archive is rebuilt after a changes, this patch will be 
removed from the archive.

--Andrew Black

Farid Zaripov wrote:
>   Attached is a patch to the windows build infrastructure.
> 
>   Martin or Andrew: can someone apply that patch to the night build 
> system to test the changes before I commit?
> 
>   ChangeLog:
>   * build.wsf: New script file to build specified configuration
>   * configure.wsf (configure): Check if the environment variable
>   exist before removing; use MT DLL runtime instead of ST static
>   runtime in ST DLL solution configurations
>   * devenv_consts.js: Added new constants
>   * generate.wsf: Removed unused BUILDTYPE option from usage text;
>   by default don't generate projects for build and test locales;
>   generate additional solution files (stdlib + examples;
>   stdlib + rwtest + tests; stdlib + utils + locales;
>   stdlib + utils + locale tests;
>   stdlib + utils + run_examples + run_tests); use new build.wsf
>   script in generated build batch file
>   * makelog.wsf (makelog): Updated according to new directory structure
>   * projectdef.js (InitVSObjects): Added freedte parameter, don't free
>   dte object if freedte == false;
>   (projectCreateVCProject): Use MT DLL runtime instead of ST static
>   runtime in ST DLL solution configurations;
>   (projectCreateProjectDefsFromFolder): Add name of subfolder to the
>   OutDir only if shiftOutDir is true;
>   (projectCreateTestLocalesDef): New function to generate project for
>   perform all locale tests in one shot;
>   * projects.js (CreateProjectDefs): Added generation of the 3 projects:
>   .stdcxx_runexamples; .stdcxx_runtests; .stdcxx_testlocales. Now
>   returns array of the sets of projects (configure, stdlib, rwtest,
>   utils, examples, run_examples, tests, run_tests, locales,
>   locale_tests)
>   * run_locale_utils.wsf (Cleanup): New function to remove
>   temporary folder
>   (Exit): New function to exit from script with cleanup
>   (CreateFolder): New function to create directory three
>   (dump_charmap): New function to dump the charmap of a locale
>   (dump_locale): On error exited script with the same non-zero
>   exit status as the locale utility
>   (generate_locale): Used Exit function
>   (test_locale): Called dump_charmap to produce the charmap source
>   from the locale database at each of the three stages. Used this
>   charmap source to create a locale in each subsequent stage.
>   Placed the files created at each stage in separate directories
>   named stage.1 through stage.3.
>   (run_locale_utils): Avoided deleting stage directories when
>   the -n option is set
>   * runall.wsf: Parameter INOUTDIR now is optional; removed unused
>   parameter COPYRWTESTDLL;
>   (readOutFile): check manual and tutorial subfolders when searching
>   example requested output file;
>   (runWithChecks, runNoChecks): Removed as unused;
>   (runAllExamples): Rewritten to use exec utility in packet mode.
>   * summary.js (saveBuildInfoTable): encode symbols in example output
>   before saving them to HTML file
>   (readBuildLog): Added temporary loop to check the run-time error
>   "runall.wsf(59, 6) Microsoft JScript runtime error: Permission denied"
> 
> Farid.