Browse Source

HPCC-10200 Decompress graphs in wuget output

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 years ago
parent
commit
f5cde18a50
2 changed files with 7 additions and 0 deletions
  1. 2 0
      tools/wuget/CMakeLists.txt
  2. 5 0
      tools/wuget/wuget.cpp

+ 2 - 0
tools/wuget/CMakeLists.txt

@@ -27,6 +27,7 @@ include_directories (
          ./../../system/jlib
          ./../../common/dllserver
          ./../../system/include 
+         ./../../common/workunit
     )
 
 ADD_DEFINITIONS( -DMODULE_PRIORITY=1 -D_CONSOLE )
@@ -36,6 +37,7 @@ HPCC_ADD_EXECUTABLE ( wuget ${SRCS} )
 target_link_libraries ( wuget
          jlib
          dllserver
+         workunit
          )
 install ( TARGETS wuget RUNTIME DESTINATION ${EXEC_DIR} )
 

+ 5 - 0
tools/wuget/wuget.cpp

@@ -17,6 +17,7 @@
 
 #include "jlib.hpp"
 #include "thorplugin.hpp"
+#include "workunit.hpp"
 
 void usage(const char *progname)
 {
@@ -25,6 +26,7 @@ void usage(const char *progname)
 
 int main(int argc, char **argv)
 {
+    InitModuleObjects();
     bool doManifestInfo = false;
     bool doWorkunit = false;
     for (int i = 1; i < argc; i++)
@@ -54,6 +56,9 @@ int main(int argc, char **argv)
                 StringBuffer xml;
                 if (getWorkunitXMLFromFile(argv[i], xml))
                 {
+                    Owned<ILocalWorkUnit> wu = createLocalWorkUnit();
+                    wu->loadXML(xml);
+                    exportWorkUnitToXML(wu, xml.clear(), true, false);
                     printf("%s\n", xml.str());
                 }
                 else